[llvm] [NVPTX] Do not emit `.target debug` if only line tables are requested (PR #140146)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 14:19:27 PDT 2025


================
@@ -745,8 +745,8 @@ void NVPTXAsmPrinter::emitHeader(Module &M, raw_ostream &O,
     switch(CU->getEmissionKind()) {
     case DICompileUnit::NoDebug:
     case DICompileUnit::DebugDirectivesOnly:
-      break;
     case DICompileUnit::LineTablesOnly:
+      break;
----------------
dwblaikie wrote:

LineTablesOnly unfortunately means /almost/ line tables only - it actually means line tables, /and/ enough of .debug_info to describe inlining.

The DebugDirectivesOnly is means /really/ only the debug directives that generate only the line table (.debug_line (and in DWARFv5, .debug_line_str)).

https://github.com/llvm/llvm-project/pull/140146


More information about the llvm-commits mailing list