diff options
| author | Devang Patel <dpatel@apple.com> | 2011-07-19 22:31:15 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2011-07-19 22:31:15 +0000 |
| commit | a59b24b090cd4273f7a246f3d886fe8496266fe3 (patch) | |
| tree | e2a2db0ba292336a2b96f5865fa6946b198064fd /llvm/lib/Transforms | |
| parent | 97094d8f060ff6dcf0e7aa95224a6f388a772351 (diff) | |
| download | bcm5719-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.cpp | 9 |
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)); + } + } } } } |

