diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-07-25 23:32:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-07-25 23:32:59 +0000 |
commit | be66271f04c8a2c7911a549bfd961a47a8d5e12d (patch) | |
tree | 1196e4ed08be6b8453fbc3df6bfb8aeed908d101 /llvm/lib/CodeGen | |
parent | 756feb2a516879974b1ffb7368ff64a84e1b830a (diff) | |
download | bcm5719-llvm-be66271f04c8a2c7911a549bfd961a47a8d5e12d.tar.gz bcm5719-llvm-be66271f04c8a2c7911a549bfd961a47a8d5e12d.zip |
Debug Info: Support fragmented variables in the MMI side table
This reapplies commit r309034 with a bugfix+test for inlined variables.
llvm-svn: 309057
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 036d1080a28..9533d61d08a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -779,6 +779,7 @@ void DwarfDebug::ensureAbstractVariableIsCreatedIfScoped(DwarfCompileUnit &CU, // Collect variable information from side table maintained by MF. void DwarfDebug::collectVariableInfoFromMFTable( DwarfCompileUnit &TheCU, DenseSet<InlinedVariable> &Processed) { + SmallDenseMap<InlinedVariable, DbgVariable *> MFVars; for (const auto &VI : Asm->MF->getVariableDbgInfo()) { if (!VI.Var) continue; @@ -796,8 +797,12 @@ void DwarfDebug::collectVariableInfoFromMFTable( ensureAbstractVariableIsCreatedIfScoped(TheCU, Var, Scope->getScopeNode()); auto RegVar = make_unique<DbgVariable>(Var.first, Var.second); RegVar->initializeMMI(VI.Expr, VI.Slot); - if (InfoHolder.addScopeVariable(Scope, RegVar.get())) + if (DbgVariable *DbgVar = MFVars.lookup(Var)) + DbgVar->addMMIEntry(*RegVar); + else if (InfoHolder.addScopeVariable(Scope, RegVar.get())) { + MFVars.insert({Var, RegVar.get()}); ConcreteVariables.push_back(std::move(RegVar)); + } } } |