aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 2d6f6a3..94cf118 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1715,7 +1715,7 @@ static void insertDbgValueOrDbgVariableRecordAfter(
if (!UseNewDbgInfoFormat) {
auto DbgVal = Builder.insertDbgValueIntrinsic(DV, DIVar, DIExpr, NewLoc,
(Instruction *)nullptr);
- cast<Instruction *>(DbgVal)->insertAfter(&*Instr);
+ cast<Instruction *>(DbgVal)->insertAfter(Instr);
} else {
// RemoveDIs: if we're using the new debug-info format, allocate a
// DbgVariableRecord directly instead of a dbg.value intrinsic.
@@ -2197,7 +2197,7 @@ void llvm::insertDebugValuesForPHIs(BasicBlock *BB,
auto *NewDbgII = DI.second;
auto InsertionPt = Parent->getFirstInsertionPt();
assert(InsertionPt != Parent->end() && "Ill-formed basic block");
- NewDbgII->insertBefore(&*InsertionPt);
+ NewDbgII->insertBefore(InsertionPt);
}
}
@@ -2975,7 +2975,7 @@ CallInst *llvm::createCallMatchingInvoke(InvokeInst *II) {
CallInst *llvm::changeToCall(InvokeInst *II, DomTreeUpdater *DTU) {
CallInst *NewCall = createCallMatchingInvoke(II);
NewCall->takeName(II);
- NewCall->insertBefore(II);
+ NewCall->insertBefore(II->getIterator());
II->replaceAllUsesWith(NewCall);
// Follow the call by a branch to the normal destination.
@@ -4307,9 +4307,9 @@ Value *llvm::invertCondition(Value *Condition) {
auto *Inverted =
BinaryOperator::CreateNot(Condition, Condition->getName() + ".inv");
if (Inst && !isa<PHINode>(Inst))
- Inverted->insertAfter(Inst);
+ Inverted->insertAfter(Inst->getIterator());
else
- Inverted->insertBefore(&*Parent->getFirstInsertionPt());
+ Inverted->insertBefore(Parent->getFirstInsertionPt());
return Inverted;
}