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
// Get the subprogram die.
DIE *SPDie = ModuleCU->getDieMapSlotFor(SPD.getNode());
// 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) {
assert(SPDie && "Missing subprogram descriptor");
if (!AbstractScope) {