If subprogram die is not available then construct new one.

This can happen if debug info is processed lazily.

llvm-svn: 83347
This commit is contained in:
Devang Patel 2009-10-05 23:59:00 +00:00
parent ce133e5225
commit 1c9eef72b4
1 changed files with 4 additions and 0 deletions

View File

@ -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) {