[Mlir-commits] [mlir] 4c77cc6 - [mlir][IR] Fix `checkFoldResult` error message (#104559)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Aug 16 00:51:04 PDT 2024


Author: Luke Boyer
Date: 2024-08-16T09:51:01+02:00
New Revision: 4c77cc634d49782aceff77f7ec4e6183ec223020

URL: https://github.com/llvm/llvm-project/commit/4c77cc634d49782aceff77f7ec4e6183ec223020
DIFF: https://github.com/llvm/llvm-project/commit/4c77cc634d49782aceff77f7ec4e6183ec223020.diff

LOG: [mlir][IR] Fix `checkFoldResult` error message (#104559)

checkFoldResult error message has expected and actual backwards.

Added: 
    

Modified: 
    mlir/lib/IR/Operation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp
index b51357198b1ca0..8f28d61c732cdc 100644
--- a/mlir/lib/IR/Operation.cpp
+++ b/mlir/lib/IR/Operation.cpp
@@ -619,8 +619,8 @@ static void checkFoldResultTypes(Operation *op,
     if (auto value = dyn_cast<Value>(ofr)) {
       if (value.getType() != opResult.getType()) {
         op->emitOpError() << "folder produced a value of incorrect type: "
-                          << opResult.getType()
-                          << ", expected: " << value.getType();
+                          << value.getType()
+                          << ", expected: " << opResult.getType();
         assert(false && "incorrect fold result type");
       }
     }


        


More information about the Mlir-commits mailing list