[PATCH] D46061: [DEBUGINFO, NVPTX] Disable emission of ', debug' option if only debug directives are allowed.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 08:53:55 PST 2018


ABataev added inline comments.


================
Comment at: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:888-890
+    case DICompileUnit::DebugDirectivesOnly:
+      break;
+    case DICompileUnit::LineTablesOnly:
----------------
echristo wrote:
> This seems to conflict with what you said above:
> 
> "When we have full debug info, we need to add debug option to the target directive. When we do not emit debug info or emit just debug directives (i.e. only lineinfo),"
> 
> as LineTablesOnly is line tables. If we need to split line tables into "things that handle inlining and things that don't" we should handle that discrepancy, but DebugDirectivesOnly isn't very helpful as a descriptor of what the compiler should be doing and paying attention to.
Yes, because I reworked the patch for the frontend. LineTablesOnly is considered as normal debug info option now. Plus, even before, when we saw -line-table-only option for NVPTX target, we still emitted `DICompileUnit::DebugDirectivesOnly` debug info kind. So, this is ok even for the previous description.


================
Comment at: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:956-958
+  // Output last DWARF .file directives, if any.
+  static_cast<NVPTXTargetStreamer *>(OutStreamer->getTargetStreamer())
+      ->outputDwarfFileDirectives();
----------------
echristo wrote:
> What's going on here?
I split this patch into 2 different patches.


Repository:
  rL LLVM

https://reviews.llvm.org/D46061





More information about the llvm-commits mailing list