brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 7f988b4 Raw
64 lines · plain
1; This checks that .debug_info can be generated in the DWARF64 format.2 3; RUN: llc -mtriple=x86_64 -dwarf-version=3 -dwarf64 -filetype=obj %s -o %t34; RUN: llvm-dwarfdump -debug-abbrev -debug-info -v %t3 | \5; RUN:   FileCheck %s --check-prefixes=CHECK,DWARFv36 7; RUN: llc -mtriple=x86_64 -dwarf-version=4 -dwarf64 -filetype=obj %s -o %t48; RUN: llvm-dwarfdump -debug-abbrev -debug-info -v %t4 | \9; RUN:   FileCheck %s --check-prefixes=CHECK,DWARFv410 11; CHECK:        .debug_abbrev contents:12; CHECK:        [1] DW_TAG_compile_unit   DW_CHILDREN_yes13; CHECK-NEXT:     DW_AT_producer  DW_FORM_strp14; CHECK-NEXT:     DW_AT_language  DW_FORM_data215; CHECK-NEXT:     DW_AT_name      DW_FORM_strp16; DWARFv3-NEXT:   DW_AT_stmt_list DW_FORM_data817; DWARFv4-NEXT:   DW_AT_stmt_list DW_FORM_sec_offset18; CHECK-NEXT:     DW_AT_comp_dir  DW_FORM_strp19; CHECK:        [2] DW_TAG_variable   DW_CHILDREN_no20; CHECK-NEXT:     DW_AT_name      DW_FORM_strp21; CHECK-NEXT:     DW_AT_type      DW_FORM_ref422; CHECK:        [3] DW_TAG_base_type  DW_CHILDREN_no23; CHECK-NEXT:     DW_AT_name      DW_FORM_strp24 25; CHECK:        .debug_info contents:26; CHECK:        Compile Unit: length = 0x{{([[:xdigit:]]{16})}}, format = DWARF64,27; CHECK:        DW_TAG_compile_unit [1] *28; CHECK-NEXT:     DW_AT_producer [DW_FORM_strp]   ( .debug_str[0x{{([[:xdigit:]]{16})}}] = "clang version 12.0.0")29; CHECK-NEXT:     DW_AT_language [DW_FORM_data2]  (DW_LANG_C99)30; CHECK-NEXT:     DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{([[:xdigit:]]{16})}}] = "foo.c")31; DWARFv3-NEXT:   DW_AT_stmt_list [DW_FORM_data8] (0x0000000000000000)32; DWARFv4-NEXT:   DW_AT_stmt_list [DW_FORM_sec_offset] (0x0000000000000000)33; CHECK-NEXT:     DW_AT_comp_dir [DW_FORM_strp]   ( .debug_str[0x{{([[:xdigit:]]{16})}}] = "/tmp")34; CHECK:        DW_TAG_variable [2]35; CHECK-NEXT:     DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{([[:xdigit:]]{16})}}] = "foo")36; CHECK-NEXT:     DW_AT_type [DW_FORM_ref4]       (cu + {{.+}} => {{.+}} "int")37; CHECK:        DW_TAG_base_type [3]38; CHECK-NEXT:     DW_AT_name [DW_FORM_strp]       ( .debug_str[0x{{([[:xdigit:]]{16})}}] = "int")39 40; IR generated and reduced from:41; $ cat foo.c42; int foo;43; $ clang -g -S -emit-llvm foo.c -o foo.ll44 45target triple = "x86_64-unknown-linux-gnu"46 47@foo = dso_local global i32 0, align 4, !dbg !048 49!llvm.dbg.cu = !{!2}50!llvm.module.flags = !{!7, !8, !9}51!llvm.ident = !{!10}52 53!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())54!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)55!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 12.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)56!3 = !DIFile(filename: "foo.c", directory: "/tmp")57!4 = !{}58!5 = !{!0}59!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)60!7 = !{i32 7, !"Dwarf Version", i32 4}61!8 = !{i32 2, !"Debug Info Version", i32 3}62!9 = !{i32 1, !"wchar_size", i32 4}63!10 = !{!"clang version 12.0.0"}64