summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/Value.cpp')
-rw-r--r--mlir/lib/IR/Value.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/IR/Value.cpp b/mlir/lib/IR/Value.cpp
index d723eec8b29..ffb9601f1c9 100644
--- a/mlir/lib/IR/Value.cpp
+++ b/mlir/lib/IR/Value.cpp
@@ -13,8 +13,8 @@ using namespace mlir;
/// If this value is the result of an Operation, return the operation that
/// defines it.
-Operation *Value::getDefiningOp() {
- if (auto *result = dyn_cast<OpResult>())
+Operation *Value::getDefiningOp() const {
+ if (auto result = dyn_cast<OpResult>())
return result->getOwner();
return nullptr;
}
OpenPOWER on IntegriCloud