[PATCH] D69839: [DebugInfo] Fix for stopping emission of debug_macinfo section in normal case and -fno-debug-macro switch enabled case.

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 03:08:38 PST 2019


SouraVX marked 2 inline comments as done.
SouraVX added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2735
 
-  if (llvm::all_of(CUMap, [](const decltype(CUMap)::value_type &Pair) {
-        return Pair.second->getCUNode()->isDebugDirectivesOnly();
----------------
This seems redundant to me, since eventually it's checked again in the main loop{emission}. 


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2741
-  // Start the dwarf macinfo section.
-  Asm->OutStreamer->SwitchSection(
-      Asm->getObjFileLowering().getDwarfMacinfoSection());
----------------
Moved this main emission loop, switch only when it's needed.


================
Comment at: llvm/test/DebugInfo/X86/debug-macro.ll:27
 ; CHECK-NEXT: DW_MACINFO_end_file
-; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1
-; CHECK-NEXT: DW_MACINFO_end_file
----------------
I'm not sure of this, but these are causing this test case failure ??


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

https://reviews.llvm.org/D69839





More information about the llvm-commits mailing list