[PATCH] D29407: AsmPrinter: Emit debug information sections lasst

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 12:29:41 PST 2017

echristo added inline comments.

Comment at: include/llvm/CodeGen/AsmPrinter.h:129
     const char *TimerGroupDescription;
+    bool EmitLate; ///< Handlers endModule() is called after EmitEndOfAsmFile().
     HandlerInfo(AsmPrinterHandler *Handler, const char *TimerName,
MatzeB wrote:
> aprantl wrote:
> > Is this supposed to mean "(The) Handler's" or "Handles", or can I just not parse that sentence? ;-)
> Yep I meant "The Handler's" and tried hard to stay within 80 columns, looks like I need a line break after all :)
Let's try to avoid booleans here and define an enum of "when to emit" at least?

Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1204
   for (const HandlerInfo &HI : Handlers) {
+    if (HI.EmitLate)
+      continue;
This loop makes it feel like we should actually be checking EH for "emit early" rather than everything else for emit late... 

Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1285
+  // Finalize late handlers (debug info).
+  for (const HandlerInfo &HI : Handlers) {
Unconvinced that this should go after EmitEndOfAsmFile... what's the rationale here?

Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1292
+    }
+    delete HI.Handler;
+  }
Comment as to why this isn't next to the endModule above.



More information about the llvm-commits mailing list