# This checks that .debug_aranges is always generated for the SCE debugger
# tuning.
RUN: rm -rf %t && split-file %s %t && cd %t
RUN: llc -debugger-tune=sce -filetype=obj foo.ll -o foo.o
RUN: llvm-dwarfdump -debug-aranges foo.o | FileCheck %s
CHECK: .debug_aranges contents:
CHECK-NEXT: Address Range Header:
CHECK-SAME: length = 0x0000002c,
#--- foo.c
int foo;
#--- gen
clang --target=x86_64-linux-gnu -g -S -emit-llvm foo.c -o -
#--- foo.ll
; ModuleID = 'foo.c'
source_filename = "foo.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@foo = dso_local global i32 0, align 4, !dbg !0
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!6, !7, !8, !9, !10, !11, !12}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !3, line: 1, type: !5, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
!3 = !DIFile(filename: "foo.c", directory: "/proc/self/cwd", checksumkind: CSK_MD5, checksum: "e0f2c326d820c28d30f9b0ea95178f64")
!4 = !{!0}
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!6 = !{i32 7, !"Dwarf Version", i32 5}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !{i32 1, !"wchar_size", i32 4}
!9 = !{i32 8, !"PIC Level", i32 2}
!10 = !{i32 7, !"PIE Level", i32 2}
!11 = !{i32 7, !"uwtable", i32 2}
!12 = !{i32 7, !"frame-pointer", i32 2}