summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-07-19 22:31:15 +0000
committerDevang Patel <dpatel@apple.com>2011-07-19 22:31:15 +0000
commita59b24b090cd4273f7a246f3d886fe8496266fe3 (patch)
treee2a2db0ba292336a2b96f5865fa6946b198064fd /llvm/lib/Transforms
parent97094d8f060ff6dcf0e7aa95224a6f388a772351 (diff)
downloadbcm5719-llvm-a59b24b090cd4273f7a246f3d886fe8496266fe3.tar.gz
bcm5719-llvm-a59b24b090cd4273f7a246f3d886fe8496266fe3.zip
Distinguish between two copies of one inlined variable.
llvm-svn: 135528
Diffstat (limited to 'llvm/lib/Transforms')
-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 6d8a319635c..714b12c7d29 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));
+ }
+ }
}
}
}
OpenPOWER on IntegriCloud