1 ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s 2 3 4 ; CHECK-LABEL: .debug_info contents: 5 ; CHECK: DW_TAG_compile_unit 6 ; CHECK-NOT: DW_TAG 7 ; CHECK: DW_AT_name {{.*}}"debug-macro.cpp") 8 ; CHECK: DW_AT_macro_info {{.*}}(0x00000000) 9 ; CHECK: DW_TAG_compile_unit 10 ; CHECK-NOT: DW_TAG 11 ; CHECK: DW_AT_name {{.*}}"debug-macro1.cpp") 12 ; CHECK: DW_AT_macro_info {{.*}}(0x00000044) 13 ; CHECK: DW_TAG_compile_unit 14 ; CHECK-NOT: DW_TAG 15 ; CHECK: DW_AT_name {{.*}}"debug-macro2.cpp") 16 ; CHECK-NOT: DW_AT_macro_info 17 18 ; CHECK-LABEL: .debug_macinfo contents: 19 ; CHECK-NEXT: DW_MACINFO_define - lineno: 0 macro: NameCMD ValueCMD 20 ; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1 21 ; CHECK-NEXT: DW_MACINFO_start_file - lineno: 9 filenum: 2 22 ; CHECK-NEXT: DW_MACINFO_define - lineno: 1 macro: NameDef Value 23 ; CHECK-NEXT: DW_MACINFO_undef - lineno: 11 macro: NameUndef 24 ; CHECK-NEXT: DW_MACINFO_end_file 25 ; CHECK-NEXT: DW_MACINFO_undef - lineno: 10 macro: NameUndef2 26 ; CHECK-NEXT: DW_MACINFO_end_file 27 ; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1 28 ; CHECK-NEXT: DW_MACINFO_end_file 29 30 ; CHECK-LABEL: .debug_line contents: 31 ; CHECK: file_names[ 1]: 32 ; CHECK: name: "debug-macro.cpp" 33 ; CHECK: file_names[ 2]: 34 ; CHECK: name: "debug-macro.h" 35 ; CHECK: file_names[ 1]: 36 ; CHECK: name: "debug-macro1.cpp" 37 38 !llvm.dbg.cu = !{!0, !16, !20} 39 !llvm.module.flags = !{!13, !14} 40 !llvm.ident = !{!15} 41 42 !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) 43 !1 = !DIFile(filename: "debug-macro.cpp", directory: "/") 44 !2 = !{} 45 !3 = !{!4, !5} 46 !4 = !DIMacro(type: DW_MACINFO_define, line: 0, name: "NameCMD", value: "ValueCMD") 47 !5 = !DIMacroFile(line: 0, file: !1, nodes: !6) 48 !6 = !{!7, !12} 49 !7 = !DIMacroFile(line: 9, file: !8, nodes: !9) 50 !8 = !DIFile(filename: "debug-macro.h", directory: "/") 51 !9 = !{!10, !11} 52 !10 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "NameDef", value: "Value") 53 !11 = !DIMacro(type: DW_MACINFO_undef, line: 11, name: "NameUndef") 54 !12 = !DIMacro(type: DW_MACINFO_undef, line: 10, name: "NameUndef2") 55 56 !13 = !{i32 2, !"Dwarf Version", i32 4} 57 !14 = !{i32 1, !"Debug Info Version", i32 3} 58 !15 = !{!"clang version 3.5.0 "} 59 60 !16 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !2, retainedTypes: !22, globals: !2, imports: !2, macros: !18) 61 !17 = !DIFile(filename: "debug-macro1.cpp", directory: "/") 62 !18 = !{!19} 63 !19 = !DIMacroFile(line: 0, file: !17, nodes: !2) 64 65 !20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !2, retainedTypes: !24, globals: !2, imports: !2) 66 !21 = !DIFile(filename: "debug-macro2.cpp", directory: "/") 67 !22 = !{!23} 68 !23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 69 !24 = !{!25} 70 !25 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) 71