aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commitffd9c3dd4a0f9b5c341b27862540c1ed165b22a7 (patch)
tree1eeeadba1e9178ffcea656304374ca364eff8b19 /lib
parent4ece4e26f237eaeaf04bfe124c51d4ed918439b0 (diff)
downloadexternal_llvm-ffd9c3dd4a0f9b5c341b27862540c1ed165b22a7.zip
external_llvm-ffd9c3dd4a0f9b5c341b27862540c1ed165b22a7.tar.gz
external_llvm-ffd9c3dd4a0f9b5c341b27862540c1ed165b22a7.tar.bz2
If subprogram die is not available then construct new one.
This can happen if debug info is processed lazily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 2aff2f2..b80d2e7 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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) {