summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-07-25 21:29:22 +0000
committerAdrian Prantl <aprantl@apple.com>2017-07-25 21:29:22 +0000
commit3d1ab0cd1efb7de6f24b4fd4a29d36a8c33d7b76 (patch)
treef9978a8767aaa70876cf9a41691164b4e22c57c4 /llvm/lib/CodeGen
parent65fdf677f28407efea358027ecc56c7e1d0c41d8 (diff)
downloadbcm5719-llvm-3d1ab0cd1efb7de6f24b4fd4a29d36a8c33d7b76.tar.gz
bcm5719-llvm-3d1ab0cd1efb7de6f24b4fd4a29d36a8c33d7b76.zip
Debug Info: Support fragmented variables in the MMI side table
<rdar://problem/17816343> llvm-svn: 309034
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
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..90ba8f76389 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<const DILocalVariable *, 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(VI.Var))
+ DbgVar->addMMIEntry(*RegVar);
+ else if (InfoHolder.addScopeVariable(Scope, RegVar.get())) {
+ MFVars.insert({VI.Var, RegVar.get()});
ConcreteVariables.push_back(std::move(RegVar));
+ }
}
}
OpenPOWER on IntegriCloud