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

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 10:30:42 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;
----------------
Artem-B wrote:

@dwblaikie Do I understand it correctly that `LineTablesOnly` only implies that debug info will be limited to line info only, but it does not say anything about the format of that info. I.e. that it could be either done via debug directives or via DWARF.

If that's the case, then this change is wrong, and the current code is correct.

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


More information about the llvm-commits mailing list