summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-05 23:59:00 +0000
committerDevang Patel <dpatel@apple.com>2009-10-05 23:59:00 +0000
commit1c9eef72b442a12235d3b47cc63ae3917d139cfd (patch)
treed9a8f14ec3ea0635fb27a3d3197bd292432a9137 /llvm/lib/CodeGen
parentce133e5225df79d53fc48f3e4aea12a89904c083 (diff)
downloadbcm5719-llvm-1c9eef72b442a12235d3b47cc63ae3917d139cfd.tar.gz
bcm5719-llvm-1c9eef72b442a12235d3b47cc63ae3917d139cfd.zip
If subprogram die is not available then construct new one.
This can happen if debug info is processed lazily. llvm-svn: 83347
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 2aff2f2593b..b80d2e75aad 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1464,6 +1464,10 @@ void DwarfDebug::ConstructFunctionDbgScope(DbgScope *RootScope,
// Get the subprogram die.
DIE *SPDie = ModuleCU->getDieMapSlotFor(SPD.getNode());
+ if (!SPDie) {
+ ConstructSubprogram(SPD.getNode());
+ SPDie = ModuleCU->getDieMapSlotFor(SPD.getNode());
+ }
assert(SPDie && "Missing subprogram descriptor");
if (!AbstractScope) {
OpenPOWER on IntegriCloud