[PATCH] D41827: [DEBUG] Initial adaptation of NVPTX target for debug info emission.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 19:03:20 PST 2018


probinson added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:416
     DIE &Die, SmallVector<RangeSpan, 2> Ranges) {
-  if (Ranges.size() == 1) {
-    const auto &single = Ranges.front();
-    attachLowHighPC(Die, single.getStart(), single.getEnd());
+  if (Ranges.size() == 1 || DD->useSectionsAsReferences()) {
+    const auto &front = Ranges.front();
----------------
ABataev wrote:
> echristo wrote:
> > I don't believe that this is a necessary or sufficient check here. What's the point of it?
> PTX format does not allow use of `.debug_ranges` section, we should not emit it.
The .debug_ranges section was not defined in DWARF v2.  Better to avoid emitting it based on the DWARF version.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:274
+    DebuggerTuning = DebuggerKind::GDB;
+  else if (Asm->TM.Options.DebuggerTuning != DebuggerKind::Default)
     DebuggerTuning = Asm->TM.Options.DebuggerTuning;
----------------
Unconditionally ignoring a command-line option?  Are there tests that fail if you don't do this?


Repository:
  rL LLVM

https://reviews.llvm.org/D41827





More information about the llvm-commits mailing list