diff options
Diffstat (limited to 'mlir/lib/IR/Value.cpp')
-rw-r--r-- | mlir/lib/IR/Value.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/IR/Value.cpp b/mlir/lib/IR/Value.cpp index 073c3b369c6..65a98f7ee59 100644 --- a/mlir/lib/IR/Value.cpp +++ b/mlir/lib/IR/Value.cpp @@ -30,7 +30,7 @@ Operation *Value::getDefiningOp() { } /// Return the function that this Value is defined in. -Function *Value::getFunction() { +Function Value::getFunction() { switch (getKind()) { case Value::Kind::BlockArgument: return cast<BlockArgument>(this)->getFunction(); @@ -84,7 +84,7 @@ void IRObjectWithUseList::dropAllUses() { //===----------------------------------------------------------------------===// /// Return the function that this argument is defined in. -Function *BlockArgument::getFunction() { +Function BlockArgument::getFunction() { if (auto *owner = getOwner()) return owner->getFunction(); return nullptr; @@ -92,6 +92,6 @@ Function *BlockArgument::getFunction() { /// Returns if the current argument is a function argument. bool BlockArgument::isFunctionArgument() { - auto *containingFn = getFunction(); - return containingFn && &containingFn->front() == getOwner(); + auto containingFn = getFunction(); + return containingFn && &containingFn.front() == getOwner(); } |