Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)).

case DICompileUnit::FullDebug:
HasFullDebugInfo = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/NVPTX/debug-file-loc.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
;__device__ void bar() {}
;}

; CHECK: .target sm_{{[0-9]+}}, debug
; CHECK: .target sm_{{[0-9]+}}

; CHECK: .visible .func foo()
; CHECK: .loc [[FOO:[0-9]+]] 1 31
Expand Down