1; RUN: llc -mtriple=x86_64 -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 {{.*}}(0x00000045) 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: 0x00000000: 20; CHECK-NEXT: DW_MACINFO_define - lineno: 0 macro: NameCMD ValueCMD 21; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1 22; CHECK-NEXT: DW_MACINFO_start_file - lineno: 9 filenum: 2 23; CHECK-NEXT: DW_MACINFO_define - lineno: 1 macro: NameDef Value 24; CHECK-NEXT: DW_MACINFO_undef - lineno: 11 macro: NameUndef 25; CHECK-NEXT: DW_MACINFO_end_file 26; CHECK-NEXT: DW_MACINFO_undef - lineno: 10 macro: NameUndef2 27; CHECK-NEXT: DW_MACINFO_end_file 28; CHECK-EMPTY: 29; CHECK-NEXT: 0x00000045: 30; CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1 31; CHECK-NEXT: DW_MACINFO_end_file 32 33; CHECK-LABEL: .debug_line contents: 34; CHECK: file_names[ 1]: 35; CHECK: name: "debug-macro.cpp" 36; CHECK: file_names[ 2]: 37; CHECK: name: "debug-macro.h" 38; CHECK: file_names[ 1]: 39; CHECK: name: "debug-macro1.cpp" 40 41!llvm.dbg.cu = !{!0, !16, !20} 42!llvm.module.flags = !{!13, !14} 43!llvm.ident = !{!15} 44 45!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) 46!1 = !DIFile(filename: "debug-macro.cpp", directory: "/") 47!2 = !{} 48!3 = !{!4, !5} 49!4 = !DIMacro(type: DW_MACINFO_define, line: 0, name: "NameCMD", value: "ValueCMD") 50!5 = !DIMacroFile(line: 0, file: !1, nodes: !6) 51!6 = !{!7, !12} 52!7 = !DIMacroFile(line: 9, file: !8, nodes: !9) 53!8 = !DIFile(filename: "debug-macro.h", directory: "/") 54!9 = !{!10, !11} 55!10 = !DIMacro(type: DW_MACINFO_define, line: 1, name: "NameDef", value: "Value") 56!11 = !DIMacro(type: DW_MACINFO_undef, line: 11, name: "NameUndef") 57!12 = !DIMacro(type: DW_MACINFO_undef, line: 10, name: "NameUndef2") 58 59!13 = !{i32 2, !"Dwarf Version", i32 4} 60!14 = !{i32 1, !"Debug Info Version", i32 3} 61!15 = !{!"clang version 3.5.0 "} 62 63!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) 64!17 = !DIFile(filename: "debug-macro1.cpp", directory: "/") 65!18 = !{!19} 66!19 = !DIMacroFile(line: 0, file: !17, nodes: !2) 67 68!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) 69!21 = !DIFile(filename: "debug-macro2.cpp", directory: "/") 70!22 = !{!23} 71!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 72!24 = !{!25} 73!25 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) 74