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 | c8fcfc9cd9c0940e8afdaba8b815f8f489b457ba (patch) | |
tree | 15388a01e5f814adf55d45af3d3fc596f87d361b /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 80d01dd3d19a84621324ac444c6749602df7a513 (diff) |
Distinguish between two copies of one inlined variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 125e1e86b1..d427e287af 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1268,14 +1268,18 @@ 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(); + DbgScope *Scope = AbstractScopes.lookup(ScopeLoc.getScope(Ctx)); if (!Scope) return NULL; |