aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-10 21:50:54 +0000
committerDevang Patel <dpatel@apple.com>2011-08-10 21:50:54 +0000
commitbb23a4a9a5eb85f6fe2a8d66fc01afb58ae42515 (patch)
tree521772c71601bb601a331411132bb4d09c274f6a /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent93db2277e6e993edfbbec97876abd3f327610e44 (diff)
downloadllvm-bb23a4a9a5eb85f6fe2a8d66fc01afb58ae42515.zip
llvm-bb23a4a9a5eb85f6fe2a8d66fc01afb58ae42515.tar.gz
llvm-bb23a4a9a5eb85f6fe2a8d66fc01afb58ae42515.tar.bz2
Distinguish between two copies of one inlined variable. Take 2.
llvm-svn: 137253
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 6d8a319..714b12c 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -770,8 +770,15 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI,
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
BI != BE; ++BI) {
DebugLoc DL = BI->getDebugLoc();
- if (!DL.isUnknown())
+ if (!DL.isUnknown()) {
BI->setDebugLoc(updateInlinedAtInfo(DL, TheCallDL, BI->getContext()));
+ if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(BI)) {
+ LLVMContext &Ctx = BI->getContext();
+ MDNode *InlinedAt = BI->getDebugLoc().getInlinedAt(Ctx);
+ DVI->setOperand(2, createInlinedVariable(DVI->getVariable(),
+ InlinedAt, Ctx));
+ }
+ }
}
}
}