• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Verify the emission of accelerator tables for various targets for the DWARF<=4 case
2
3; Darwin has the apple tables unless we specifically tune for gdb
4; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %s > %t
5; RUN: llvm-readobj --sections %t | FileCheck --check-prefix=APPLE %s
6; RUN: llvm-dwarfdump -apple-names %t | FileCheck --check-prefix=APPLE-NAMES %s
7; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=gdb < %s \
8; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s
9
10; Linux does has debug_names tables only if we explicitly tune for lldb
11; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj < %s \
12; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s
13; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s \
14; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s
15
16; No accelerator tables if type units are enabled, as DWARF v4 type units are
17; not compatible with accelerator tables.
18; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -generate-type-units -debugger-tune=lldb < %s \
19; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=NONE %s
20
21; Debug types are ignored for non-ELF targets which means it shouldn't affect
22; accelerator table generation.
23; RUN: llc -mtriple=x86_64-apple-darwin12 -generate-type-units -filetype=obj < %s \
24; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s
25
26; APPLE-NOT: debug_names
27; APPLE-NOT: debug{{.*}}pub
28; APPLE: apple_names
29; APPLE-NOT: debug_names
30; APPLE: debug{{.*}}pub
31
32; APPLE-NAMES: Hashes count: 3
33
34; GNU-NOT: apple_names
35; GNU-NOT: debug_names
36; GNU: gnu_pub
37; GNU-NOT: apple_names
38; GNU-NOT: debug_names
39
40; NONE-NOT: apple_names
41; NONE-NOT: debug_names
42; NONE: debug_gnu_pub
43
44@var = thread_local global i32 0, align 4, !dbg !0
45
46; Function Attrs: norecurse nounwind readnone uwtable
47define void @_Z3funv() local_unnamed_addr #0 !dbg !11 {
48  ret void, !dbg !14
49}
50
51; Function Attrs: norecurse uwtable
52define weak_odr hidden i32* @_ZTW3var() local_unnamed_addr #1 {
53  ret i32* @var
54}
55
56attributes #0 = { norecurse nounwind readnone uwtable }
57attributes #1 = { norecurse uwtable }
58
59!llvm.dbg.cu = !{!2}
60!llvm.module.flags = !{!7, !8, !9}
61!llvm.ident = !{!10}
62
63!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
64!1 = distinct !DIGlobalVariable(name: "var", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
65!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 7.0.0 (trunk 322268) (llvm/trunk 322267)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: GNU)
66!3 = !DIFile(filename: "debugger-tune.cpp", directory: "/tmp")
67!4 = !{}
68!5 = !{!0}
69!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
70!7 = !{i32 2, !"Dwarf Version", i32 4}
71!8 = !{i32 2, !"Debug Info Version", i32 3}
72!9 = !{i32 1, !"wchar_size", i32 4}
73!10 = !{!"clang version 7.0.0 (trunk 322268) (llvm/trunk 322267)"}
74!11 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !3, file: !3, line: 2, type: !12, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !4)
75!12 = !DISubroutineType(types: !13)
76!13 = !{null}
77!14 = !DILocation(line: 2, column: 13, scope: !11)
78
79