blob: 2b3adce4776e110ba9b732755b83a1a0d85be2dc [file] [log] [blame]
Amjad Aboudd7cfb482016-01-07 14:28:20 +00001; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck --check-prefix=CHECK-INFO %s
2; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=macro - | FileCheck --check-prefix=CHECK-MACRO %s
3; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=line - | FileCheck --check-prefix=CHECK-LINE %s
4
5
6; CHECK-INFO: .debug_info contents:
7; CHECK-INFO: DW_TAG_compile_unit
8; CHECK-INFO-NOT: DW_TAG
9; CHECK-INFO: DW_AT_name {{.*}}"debug-macro.cpp")
10; CHECK-INFO: DW_AT_macro_info {{.*}}(0x00000000)
11; CHECK-INFO: DW_TAG_compile_unit
12; CHECK-INFO-NOT: DW_TAG
13; CHECK-INFO: DW_AT_name {{.*}}"debug-macro1.cpp")
14; CHECK-INFO: DW_AT_macro_info {{.*}}(0x00000044)
15; CHECK-INFO: DW_TAG_compile_unit
16; CHECK-INFO-NOT: DW_TAG
17; CHECK-INFO: DW_AT_name {{.*}}"debug-macro2.cpp")
18; CHECK-INFO-NOT: DW_AT_macro_info
19
20; CHECK-MACRO: .debug_macinfo contents:
21; CHECK-MACRO-NEXT: DW_MACINFO_define - lineno: 0 macro: NameCMD ValueCMD
22; CHECK-MACRO-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1
23; CHECK-MACRO-NEXT: DW_MACINFO_start_file - lineno: 9 filenum: 2
24; CHECK-MACRO-NEXT: DW_MACINFO_define - lineno: 1 macro: NameDef Value
25; CHECK-MACRO-NEXT: DW_MACINFO_undef - lineno: 11 macro: NameUndef
26; CHECK-MACRO-NEXT: DW_MACINFO_end_file
27; CHECK-MACRO-NEXT: DW_MACINFO_undef - lineno: 10 macro: NameUndef2
28; CHECK-MACRO-NEXT: DW_MACINFO_end_file
29; CHECK-MACRO-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1
30; CHECK-MACRO-NEXT: DW_MACINFO_end_file
31
32; CHECK-LINE: .debug_line contents:
33; CHECK-LINE: Dir Mod Time File Len File Name
34; CHECK-LINE: file_names[ 1] {{.*}}debug-macro.cpp
35; CHECK-LINE: file_names[ 2] {{.*}}debug-macro.h
36; CHECK-LINE: Dir Mod Time File Len File Name
37; CHECK-LINE: file_names[ 1] {{.*}}debug-macro1.cpp
38
39!llvm.dbg.cu = !{!0, !16, !20}
40!llvm.module.flags = !{!13, !14}
41!llvm.ident = !{!15}
42
Adrian Prantl75819ae2016-04-15 15:57:41 +000043!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, macros: !3)
Amjad Aboudd7cfb482016-01-07 14:28:20 +000044!1 = !DIFile(filename: "debug-macro.cpp", directory: "/")
45!2 = !{}
46!3 = !{!4, !5}
47!4 = !DIMacro(type: DW_MACINFO_define, line: 0, name: "NameCMD", value: "ValueCMD")
48!5 = !DIMacroFile(line: 0, file: !1, nodes: !6)
49!6 = !{!7, !12}
50!7 = !DIMacroFile(line: 9, file: !8, nodes: !9)
51!8 = !DIFile(filename: "debug-macro.h", directory: "/")
52!9 = !{!10, !11}
53!10 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "NameDef", value: "Value")
54!11 = !DIMacro(type: DW_MACINFO_undef, line: 11, name: "NameUndef")
55!12 = !DIMacro(type: DW_MACINFO_undef, line: 10, name: "NameUndef2")
56
57!13 = !{i32 2, !"Dwarf Version", i32 4}
58!14 = !{i32 1, !"Debug Info Version", i32 3}
59!15 = !{!"clang version 3.5.0 "}
60
Adrian Prantl75819ae2016-04-15 15:57:41 +000061!16 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !2, retainedTypes: !2, globals: !2, imports: !2, macros: !18)
Amjad Aboudd7cfb482016-01-07 14:28:20 +000062!17 = !DIFile(filename: "debug-macro1.cpp", directory: "/")
63!18 = !{!19}
64!19 = !DIMacroFile(line: 0, file: !17, nodes: !2)
65
Adrian Prantl75819ae2016-04-15 15:57:41 +000066!20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
Amjad Aboudd7cfb482016-01-07 14:28:20 +000067!21 = !DIFile(filename: "debug-macro2.cpp", directory: "/")