diff options
| author | Devang Patel <dpatel@apple.com> | 2009-10-05 23:59:00 +0000 | 
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-10-05 23:59:00 +0000 | 
| commit | 1c9eef72b442a12235d3b47cc63ae3917d139cfd (patch) | |
| tree | d9a8f14ec3ea0635fb27a3d3197bd292432a9137 /llvm/lib/CodeGen | |
| parent | ce133e5225df79d53fc48f3e4aea12a89904c083 (diff) | |
| download | bcm5719-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.cpp | 4 | 
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) { | 

