1; Verify the emission of accelerator tables for various targets for the DWARF<=4 case 2 3; Darwin has the apple tables unless we specifically tune for gdb 4; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %s \ 5; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s 6; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=gdb < %s \ 7; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=PUB %s 8 9; Linux does has debug_names tables only if we explicitly tune for lldb 10; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj < %s \ 11; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=PUB %s 12; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s \ 13; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=DEBUG_NAMES %s 14 15; No accelerator tables if type units are enabled, as DWARF v4 type units are 16; not compatible with accelerator tables. 17; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -generate-type-units -debugger-tune=lldb < %s \ 18; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=NONE %s 19 20; Debug types are ignored for non-ELF targets which means it shouldn't affect 21; accelerator table generation. 22; RUN: llc -mtriple=x86_64-apple-darwin12 -generate-type-units -filetype=obj < %s \ 23; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s 24 25; APPLE-NOT: debug_names 26; APPLE-NOT: debug{{.*}}pub 27; APPLE: apple_names 28; APPLE-NOT: debug_names 29; APPLE-NOT: debug{{.*}}pub 30 31; PUB-NOT: apple_names 32; PUB-NOT: debug_names 33; PUB: pubnames 34; PUB-NOT: apple_names 35; PUB-NOT: debug_names 36 37; NONE-NOT: apple_names 38; NONE-NOT: debug_names 39 40; DEBUG_NAMES-NOT: apple_names 41; DEBUG_NAMES-NOT: pubnames 42; DEBUG_NAMES: debug_names 43; DEBUG_NAMES-NOT: apple_names 44; DEBUG_NAMES-NOT: pubnames 45 46@var = thread_local global i32 0, align 4, !dbg !0 47 48; Function Attrs: norecurse nounwind readnone uwtable 49define void @_Z3funv() local_unnamed_addr #0 !dbg !11 { 50 ret void, !dbg !14 51} 52 53; Function Attrs: norecurse uwtable 54define weak_odr hidden i32* @_ZTW3var() local_unnamed_addr #1 { 55 ret i32* @var 56} 57 58attributes #0 = { norecurse nounwind readnone uwtable } 59attributes #1 = { norecurse uwtable } 60 61!llvm.dbg.cu = !{!2} 62!llvm.module.flags = !{!7, !8, !9} 63!llvm.ident = !{!10} 64 65!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 66!1 = distinct !DIGlobalVariable(name: "var", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) 67!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 7.0.0 (trunk 322268) (llvm/trunk 322267)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) 68!3 = !DIFile(filename: "debugger-tune.cpp", directory: "/tmp") 69!4 = !{} 70!5 = !{!0} 71!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 72!7 = !{i32 2, !"Dwarf Version", i32 4} 73!8 = !{i32 2, !"Debug Info Version", i32 3} 74!9 = !{i32 1, !"wchar_size", i32 4} 75!10 = !{!"clang version 7.0.0 (trunk 322268) (llvm/trunk 322267)"} 76!11 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !3, file: !3, line: 2, type: !12, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !4) 77!12 = !DISubroutineType(types: !13) 78!13 = !{null} 79!14 = !DILocation(line: 2, column: 13, scope: !11) 80 81