1; RUN: llc -mtriple=nvptx64-nvidia-cuda -mattr=+ptx75 < %s | FileCheck %s
2
3; DICompileUnit without 'nameTableKind: None' results in
4; debug_pubnames and debug_pubtypes sections in DWARF. These sections
5; use labels and label expressions, and ptxas requires PTX v7.5 to
6; support them.
7
8; CHECK-LABEL: .section .debug_pubnames
9; CHECK-NEXT: {
10; CHECK-NEXT: .b32 LpubNames_end0-LpubNames_start0
11; CHECK-NEXT: LpubNames_start0:
12; CHECK:      LpubNames_end0:
13; CHECK-NEXT: }
14
15; CHECK-LABEL: .section .debug_pubtypes
16; CHECK-NEXT: {
17; CHECK-NEXT: .b32 LpubTypes_end0-LpubTypes_start0
18; CHECK-NEXT: LpubTypes_start0:
19; CHECK:      LpubTypes_end0:
20; CHECK-NEXT: }
21
22; Function Attrs: nounwind ssp uwtable
23define i32 @foo() #0 !dbg !4 {
24entry:
25  ret i32 0
26}
27
28attributes #0 = { nounwind ssp uwtable }
29
30!llvm.dbg.cu = !{!0}
31!llvm.module.flags = !{!11, !12}
32!llvm.ident = !{!13}
33
34!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
35!1 = !DIFile(filename: "debug-name-table.c", directory: "")
36!2 = !{}
37!4 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6)
38!5 = !DIFile(filename: "debug-name-table.c", directory: "")
39!6 = !DISubroutineType(types: !7)
40!7 = !{!8}
41!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
42!11 = !{i32 2, !"Dwarf Version", i32 2}
43!12 = !{i32 1, !"Debug Info Version", i32 3}
44!13 = !{!"clang version 3.5.0 "}
45