[PATCH] D51315: [debuginfo] generate debug info with asm+.file

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 11:24:58 PDT 2018


bcain added a comment.

Comments:



================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:3354-3361
+    // In case there is a -g option as well as debug info from directive .file,
+    // we turn off the -g option, directly use the existing debug info instead.
+    // Also reset any implicit ".file 0" for the assembler source.
+    if (Ctx.getGenDwarfForAssembly()) {
+      Ctx.getMCDwarfLineTable(0).resetRootFile();
+      Ctx.setGenDwarfForAssembly(false);
+    }
----------------
This code block is the interesting part moreso than the if/else.

Before r328208, an effect similar to this was in the else clause (FileNumber != 1).


Repository:
  rL LLVM

https://reviews.llvm.org/D51315





More information about the llvm-commits mailing list