aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.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
commitb549bcfe6c19dbb24162c75bbcc06d4a5fa90cb8 (patch)
tree93e9f8ad8dbecdfc7d0843923b336a39aa05666f /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentc722c3d5ffd4ad07e17f81c2b2eb7f8074559600 (diff)
downloadexternal_llvm-b549bcfe6c19dbb24162c75bbcc06d4a5fa90cb8.zip
external_llvm-b549bcfe6c19dbb24162c75bbcc06d4a5fa90cb8.tar.gz
external_llvm-b549bcfe6c19dbb24162c75bbcc06d4a5fa90cb8.tar.bz2
Distinguish between two copies of one inlined variable. Take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 475b670..fbe1c49 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1126,14 +1126,15 @@ void DwarfDebug::endModule() {
}
/// findAbstractVariable - Find abstract variable, if any, associated with Var.
-DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &Var,
+DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &DV,
DebugLoc ScopeLoc) {
-
+ LLVMContext &Ctx = DV->getContext();
+ // More then one inlined variable corresponds to one abstract variable.
+ DIVariable Var = cleanseInlinedVariable(DV, Ctx);
DbgVariable *AbsDbgVariable = AbstractVariables.lookup(Var);
if (AbsDbgVariable)
return AbsDbgVariable;
- LLVMContext &Ctx = Var->getContext();
LexicalScope *Scope = LScopes.findAbstractScope(ScopeLoc.getScope(Ctx));
if (!Scope)
return NULL;