[PATCH] D20072: Prevent DW_AT_abstract_origin from being emitted twice for the same subprogram

Amjad Aboud via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 01:45:35 PDT 2016


aaboud accepted this revision.
aaboud added a comment.
This revision is now accepted and ready to land.

LGTM.
You may commit once you fix the test as David suggested and use the __attribute__((always_inline)).

Regards,
Amjad


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:525
@@ -524,3 +524,3 @@
 void DwarfDebug::finishSubprogramDefinitions() {
   for (auto &F : MMI->getModule()->functions())
     if (auto *SP = F.getSubprogram())
----------------
This change seems to be correct.
Inline (DW_TAG_inlined_subroutine) and abstract (DW_TAG_subprogram) entries are filled once they are created.
The only entry that is filled when it is finalizing (finishing) subprograms is the concrete (DW_TAG_subprogram) entry, and this entry exists only if there is code generated for it.
So, the first loop is enough to handle this entry.


http://reviews.llvm.org/D20072





More information about the llvm-commits mailing list