[Mlir-commits] [mlir] 3e4ad66 - Fix build: the dump() method is only available in Asserts build (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Oct 17 16:09:58 PDT 2023


Author: Mehdi Amini
Date: 2023-10-17T16:09:22-07:00
New Revision: 3e4ad66fc167799b0513f95795fa4379f52f2bfb

URL: https://github.com/llvm/llvm-project/commit/3e4ad66fc167799b0513f95795fa4379f52f2bfb
DIFF: https://github.com/llvm/llvm-project/commit/3e4ad66fc167799b0513f95795fa4379f52f2bfb.diff

LOG: Fix build: the dump() method is only available in Asserts build (NFC)

Added: 
    

Modified: 
    mlir/lib/TableGen/Constraint.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/TableGen/Constraint.cpp b/mlir/lib/TableGen/Constraint.cpp
index 7297bb663376fcb..4ccbd0a685e09a5 100644
--- a/mlir/lib/TableGen/Constraint.cpp
+++ b/mlir/lib/TableGen/Constraint.cpp
@@ -31,8 +31,7 @@ Constraint::Constraint(const llvm::Record *record)
   } else if (def->isSubClassOf("SuccessorConstraint")) {
     kind = CK_Successor;
   } else if(!def->isSubClassOf("Constraint")) {
-    llvm::errs() << "Expected a constraint but got: \n";
-    def->dump();
+    llvm::errs() << "Expected a constraint but got: \n" << *def << "\n";
     llvm::report_fatal_error("Abort");
   }
 }


        


More information about the Mlir-commits mailing list