[mlir] Adopt changes in mlir-opt to standalone example
authorMarius Brehler <marius.brehler@iml.fraunhofer.de>
Thu, 14 May 2020 17:49:44 +0000 (17:49 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Thu, 14 May 2020 17:50:55 +0000 (17:50 +0000)
 MLIRContext was moved with commit 6bce7d8

Differential Revision: https://reviews.llvm.org/D79946

mlir/examples/standalone/standalone-opt/standalone-opt.cpp

index 80c68f6..5c99058 100644 (file)
@@ -73,8 +73,8 @@ int main(int argc, char **argv) {
   llvm::cl::ParseCommandLineOptions(argc, argv,
                                     "MLIR modular optimizer driver\n");
 
-  mlir::MLIRContext context;
   if (showDialects) {
+    mlir::MLIRContext context;
     llvm::outs() << "Registered Dialects:\n";
     for (mlir::Dialect *dialect : context.getRegisteredDialects()) {
       llvm::outs() << dialect->getNamespace() << "\n";