[mlir:LSP] Link the test dialect into mlir-lsp-server

This allows for more easily interacting with lit files that utilize
the test dialect.
This commit is contained in:
River Riddle 2022-05-20 18:20:13 -07:00
parent 52698a33d0
commit ebc77f012f
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@ if(MLIR_INCLUDE_TESTS)
MLIRTestPass
MLIRTestReducer
MLIRTestRewrite
MLIRTestTransformDialect
MLIRTestTransforms
)
endif()

View File

@ -13,8 +13,19 @@
using namespace mlir;
#ifdef MLIR_INCLUDE_TESTS
namespace test {
void registerTestDialect(DialectRegistry &);
void registerTestTransformDialectExtension(DialectRegistry &);
} // namespace test
#endif
int main(int argc, char **argv) {
DialectRegistry registry;
registerAllDialects(registry);
#ifdef MLIR_INCLUDE_TESTS
::test::registerTestDialect(registry);
::test::registerTestTransformDialectExtension(registry);
#endif
return failed(MlirLspServerMain(argc, argv, registry));
}