81 lines · plain
1; Verify the emission of accelerator tables for various targets for the DWARF<=4 case2 3; Darwin has the apple tables unless we specifically tune for gdb4; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %s \5; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s6; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=gdb < %s \7; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=PUB %s8 9; Linux does has debug_names tables only if we explicitly tune for lldb10; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj < %s \11; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=PUB %s12; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s \13; RUN: | llvm-readobj --sections - | FileCheck --check-prefix=DEBUG_NAMES %s14 15; No accelerator tables if type units are enabled, as DWARF v4 type units are16; 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 %s19 20; Debug types are ignored for non-ELF targets which means it shouldn't affect21; 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 %s24 25; APPLE-NOT: debug_names26; APPLE-NOT: debug{{.*}}pub27; APPLE: apple_names28; APPLE-NOT: debug_names29; APPLE-NOT: debug{{.*}}pub30 31; PUB-NOT: apple_names32; PUB-NOT: debug_names33; PUB: pubnames34; PUB-NOT: apple_names35; PUB-NOT: debug_names36 37; NONE-NOT: apple_names38; NONE-NOT: debug_names39 40; DEBUG_NAMES-NOT: apple_names41; DEBUG_NAMES-NOT: pubnames42; DEBUG_NAMES: debug_names43; DEBUG_NAMES-NOT: apple_names44; DEBUG_NAMES-NOT: pubnames45 46@var = thread_local global i32 0, align 4, !dbg !047 48; Function Attrs: norecurse nounwind readnone uwtable49define void @_Z3funv() local_unnamed_addr #0 !dbg !11 {50 ret void, !dbg !1451}52 53; Function Attrs: norecurse uwtable54define weak_odr hidden ptr @_ZTW3var() local_unnamed_addr #1 {55 ret ptr @var56}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