[Mlir-commits] [mlir] 827ab04 - Add `const` to `dump` method of `OpFoldResult`.
Mahesh Ravishankar
llvmlistbot at llvm.org
Wed Oct 5 10:32:20 PDT 2022
Author: Mahesh Ravishankar
Date: 2022-10-05T17:26:34Z
New Revision: 827ab049dc4f8a4800b32ab5aef040139d22b065
URL: https://github.com/llvm/llvm-project/commit/827ab049dc4f8a4800b32ab5aef040139d22b065
DIFF: https://github.com/llvm/llvm-project/commit/827ab049dc4f8a4800b32ab5aef040139d22b065.diff
LOG: Add `const` to `dump` method of `OpFoldResult`.
While most `dump` methods are marked `const`, some arent marked as
`const`. Adding `const` to `OpFoldResult` here since this was
encountered as an issue while debugging (doing `dump` within a debug
console threw an error indicating the method should be marked
`const`).
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D135241
Added:
Modified:
mlir/include/mlir/IR/OpDefinition.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h
index 6d49a8f9e9cf4..6d28752ff2fa3 100644
--- a/mlir/include/mlir/IR/OpDefinition.h
+++ b/mlir/include/mlir/IR/OpDefinition.h
@@ -240,7 +240,7 @@ class OpFoldResult : public PointerUnion<Attribute, Value> {
using PointerUnion<Attribute, Value>::PointerUnion;
public:
- void dump() { llvm::errs() << *this << "\n"; }
+ void dump() const { llvm::errs() << *this << "\n"; }
};
/// Allow printing to a stream.
More information about the Mlir-commits
mailing list