12c902817SJinsong Ji; Verify target-based defaults for "debugger tuning," and the ability to 22c902817SJinsong Ji; override defaults. 32c902817SJinsong Ji; We use the use of DW_FORM_string (rather than DW_FORM_strp) to distinguish the debugger tuning. 42c902817SJinsong Ji 52c902817SJinsong Ji; Verify defaults for various targets. 62c902817SJinsong Ji; RUN: llc -mtriple=powerpc64le-unknown-linux -filetype=obj < %s | llvm-dwarfdump -debug-info --show-form - | FileCheck --check-prefix=GDB %s --implicit-check-not DW_FORM_string 72c902817SJinsong Ji; TODO: Use -filetype-obj and llvm-dwarfdump when the obj mode is supported. 82c902817SJinsong Ji; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff < %s | FileCheck --check-prefix=DBX --implicit-check-not DW_FROM_strp %s 92c902817SJinsong Ji 102c902817SJinsong Ji; We can override defaults. 112c902817SJinsong Ji; RUN: llc -mtriple=powerpc64le-unknown-linux -filetype=obj -debugger-tune=dbx < %s | llvm-dwarfdump -debug-info --show-form - | FileCheck --check-prefix=DBX %s --implicit-check-not DW_FROM_strp 122c902817SJinsong Ji; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -debugger-tune=gdb < %s | FileCheck --check-prefix=GDB %s --implicit-check-not DW_FORM_string 132c902817SJinsong Ji 142c902817SJinsong Ji; GDB: DW_FORM_strp 152c902817SJinsong Ji; DBX: DW_FORM_string 162c902817SJinsong Ji 172c902817SJinsong Ji; Function Attrs: noinline nounwind optnone 182c902817SJinsong Jidefine i32 @main() #0 !dbg !8 { 192c902817SJinsong Jientry: 202c902817SJinsong Ji %retval = alloca i32, align 4 21*391f3236SBjorn Pettersson store i32 0, ptr %retval, align 4 222c902817SJinsong Ji ret i32 0, !dbg !12 232c902817SJinsong Ji} 242c902817SJinsong Ji 252c902817SJinsong Ji!llvm.dbg.cu = !{!0} 262c902817SJinsong Ji!llvm.module.flags = !{!3, !4, !5, !6} 272c902817SJinsong Ji!llvm.ident = !{!7} 282c902817SJinsong Ji 292c902817SJinsong Ji!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) 302c902817SJinsong Ji!1 = !DIFile(filename: "1.c", directory: "debug") 312c902817SJinsong Ji!2 = !{} 322c902817SJinsong Ji!3 = !{i32 7, !"Dwarf Version", i32 4} 332c902817SJinsong Ji!4 = !{i32 2, !"Debug Info Version", i32 3} 342c902817SJinsong Ji!5 = !{i32 1, !"wchar_size", i32 2} 352c902817SJinsong Ji!6 = !{i32 7, !"PIC Level", i32 2} 362c902817SJinsong Ji!7 = !{!"clang version 12.0.0"} 372c902817SJinsong Ji!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) 382c902817SJinsong Ji!9 = !DISubroutineType(types: !10) 392c902817SJinsong Ji!10 = !{!11} 402c902817SJinsong Ji!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 412c902817SJinsong Ji!12 = !DILocation(line: 3, column: 3, scope: !8) 42