1*aa842896SIgor Kudrin; This checks that the debug info is generated in the 64-bit format if the 2*aa842896SIgor Kudrin; module has the corresponding flag. 3*aa842896SIgor Kudrin 4*aa842896SIgor Kudrin; RUN: llc -mtriple=x86_64 -filetype=obj %s -o %t 5*aa842896SIgor Kudrin; RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s 6*aa842896SIgor Kudrin 7*aa842896SIgor Kudrin; CHECK: Compile Unit: {{.*}} format = DWARF64 8*aa842896SIgor Kudrin; CHECK: debug_line[ 9*aa842896SIgor Kudrin; CHECK-NEXT: Line table prologue: 10*aa842896SIgor Kudrin; CHECK-NEXT: total_length: 11*aa842896SIgor Kudrin; CHECK-NEXT: format: DWARF64 12*aa842896SIgor Kudrin 13*aa842896SIgor Kudrin; IR generated and reduced from: 14*aa842896SIgor Kudrin; $ cat foo.c 15*aa842896SIgor Kudrin; int foo; 16*aa842896SIgor Kudrin; $ clang -g -gdwarf64 -S -emit-llvm foo.c -o foo.ll 17*aa842896SIgor Kudrin 18*aa842896SIgor Kudrintarget triple = "x86_64-unknown-linux-gnu" 19*aa842896SIgor Kudrin 20*aa842896SIgor Kudrin@foo = dso_local global i32 0, align 4, !dbg !0 21*aa842896SIgor Kudrin 22*aa842896SIgor Kudrin!llvm.dbg.cu = !{!2} 23*aa842896SIgor Kudrin!llvm.module.flags = !{!7, !8, !9, !10} 24*aa842896SIgor Kudrin!llvm.ident = !{!11} 25*aa842896SIgor Kudrin 26*aa842896SIgor Kudrin!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 27*aa842896SIgor Kudrin!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) 28*aa842896SIgor Kudrin!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) 29*aa842896SIgor Kudrin!3 = !DIFile(filename: "foo.c", directory: "/tmp") 30*aa842896SIgor Kudrin!4 = !{} 31*aa842896SIgor Kudrin!5 = !{!0} 32*aa842896SIgor Kudrin!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 33*aa842896SIgor Kudrin!7 = !{i32 7, !"Dwarf Version", i32 4} 34*aa842896SIgor Kudrin!8 = !{i32 7, !"DWARF64", i32 1} 35*aa842896SIgor Kudrin!9 = !{i32 2, !"Debug Info Version", i32 3} 36*aa842896SIgor Kudrin!10 = !{i32 1, !"wchar_size", i32 4} 37*aa842896SIgor Kudrin!11 = !{!"clang version 13.0.0"} 38