aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 6931d19..3eac726 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -276,8 +276,8 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
// attached debug-info records.
for (Instruction &II : *BB) {
RemapInstruction(&II, VMap, RemapFlag, TypeMapper, Materializer);
- RemapDPValueRange(II.getModule(), II.getDbgRecordRange(), VMap, RemapFlag,
- TypeMapper, Materializer);
+ RemapDbgVariableRecordRange(II.getModule(), II.getDbgRecordRange(), VMap,
+ RemapFlag, TypeMapper, Materializer);
}
// Only update !llvm.dbg.cu for DifferentModule (not CloneModule). In the
@@ -641,8 +641,8 @@ void PruningFunctionCloner::CloneBlock(
// Recursively clone any reachable successor blocks.
append_range(ToClone, successors(BB->getTerminator()));
} else {
- // If we didn't create a new terminator, clone DPValues from the old
- // terminator onto the new terminator.
+ // If we didn't create a new terminator, clone DbgVariableRecords from the
+ // old terminator onto the new terminator.
Instruction *NewInst = NewBB->getTerminator();
assert(NewInst);
@@ -884,14 +884,15 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
TypeMapper, Materializer);
}
- // Do the same for DPValues, touching all the instructions in the cloned
- // range of blocks.
+ // Do the same for DbgVariableRecords, touching all the instructions in the
+ // cloned range of blocks.
Function::iterator Begin = cast<BasicBlock>(VMap[StartingBB])->getIterator();
for (BasicBlock &BB : make_range(Begin, NewFunc->end())) {
for (Instruction &I : BB) {
- RemapDPValueRange(I.getModule(), I.getDbgRecordRange(), VMap,
- ModuleLevelChanges ? RF_None : RF_NoModuleLevelChanges,
- TypeMapper, Materializer);
+ RemapDbgVariableRecordRange(I.getModule(), I.getDbgRecordRange(), VMap,
+ ModuleLevelChanges ? RF_None
+ : RF_NoModuleLevelChanges,
+ TypeMapper, Materializer);
}
}
@@ -990,8 +991,9 @@ void llvm::remapInstructionsInBlocks(ArrayRef<BasicBlock *> Blocks,
// Rewrite the code to refer to itself.
for (auto *BB : Blocks) {
for (auto &Inst : *BB) {
- RemapDPValueRange(Inst.getModule(), Inst.getDbgRecordRange(), VMap,
- RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
+ RemapDbgVariableRecordRange(
+ Inst.getModule(), Inst.getDbgRecordRange(), VMap,
+ RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
RemapInstruction(&Inst, VMap,
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
}