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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/IR/Value.cpp b/mlir/lib/IR/Value.cpp
index 13bd0bcd8f3..c8ea11cfc84 100644
--- a/mlir/lib/IR/Value.cpp
+++ b/mlir/lib/IR/Value.cpp
@@ -70,11 +70,11 @@ void Value::setType(Type newType) {
/// defines it.
Operation *Value::getDefiningOp() const {
if (auto result = dyn_cast<OpResult>())
- return result->getOwner();
+ return result.getOwner();
return nullptr;
}
-Location Value::getLoc() {
+Location Value::getLoc() const {
if (auto *op = getDefiningOp())
return op->getLoc();
return UnknownLoc::get(getContext());
@@ -84,7 +84,7 @@ Location Value::getLoc() {
Region *Value::getParentRegion() {
if (auto *op = getDefiningOp())
return op->getParentRegion();
- return cast<BlockArgument>()->getOwner()->getParent();
+ return cast<BlockArgument>().getOwner()->getParent();
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud