[Mlir-commits] [mlir] 426afd7 - [mlir] Adopt changes in mlir-opt to standalone example

Mehdi Amini llvmlistbot at llvm.org
Thu May 14 10:51:16 PDT 2020


Author: Marius Brehler
Date: 2020-05-14T17:50:55Z
New Revision: 426afd79da70ec8c7f82164d007fe7045e5fe05e

URL: https://github.com/llvm/llvm-project/commit/426afd79da70ec8c7f82164d007fe7045e5fe05e
DIFF: https://github.com/llvm/llvm-project/commit/426afd79da70ec8c7f82164d007fe7045e5fe05e.diff

LOG: [mlir] Adopt changes in mlir-opt to standalone example

 MLIRContext was moved with commit 6bce7d8

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/examples/standalone/standalone-opt/standalone-opt.cpp b/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
index 80c68f658bdb..5c99058693c3 100644
--- a/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
+++ b/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
@@ -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";


        


More information about the Mlir-commits mailing list