[PATCH] D94976: [DWARF] Create subprogram's DIE in the unit specified by its DISubprogram

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 12:20:11 PST 2021


dblaikie added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:525-530
+    // Subprogram definitions should be created in the Unit that they specify,
+    // which might not be "this" unit when type definitions move around under
+    // LTO.
+    if (SP->isDefinition())
+      return &DD->constructSubprogramDefinitionDIE(SP);
     return getOrCreateSubprogramDIE(SP);
----------------
Are these ever declarations/non-definitions? (I can't think of a place where we'd create a declaration as a scope) Perhaps this could just assert that the SP is a definition?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94976/new/

https://reviews.llvm.org/D94976



More information about the llvm-commits mailing list