brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · fe535e6 Raw
79 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 > %t5; RUN: llvm-readobj --sections %t | FileCheck --check-prefix=APPLE %s6; RUN: llvm-dwarfdump -apple-names %t | FileCheck --check-prefix=APPLE-NAMES %s7; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=gdb < %s \8; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s9 10; Linux does has debug_names tables only if we explicitly tune for lldb11; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj < %s \12; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s13; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s \14; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=GNU %s15 16; No accelerator tables if type units are enabled, as DWARF v4 type units are17; not compatible with accelerator tables.18; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -generate-type-units -debugger-tune=lldb < %s \19; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=NONE %s20 21; Debug types are ignored for non-ELF targets which means it shouldn't affect22; accelerator table generation.23; RUN: llc -mtriple=x86_64-apple-darwin12 -generate-type-units -filetype=obj < %s \24; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s25 26; APPLE-NOT: debug_names27; APPLE-NOT: debug{{.*}}pub28; APPLE: apple_names29; APPLE-NOT: debug_names30; APPLE: debug{{.*}}pub31 32; APPLE-NAMES: Hashes count: 333 34; GNU-NOT: apple_names35; GNU-NOT: debug_names36; GNU: gnu_pub37; GNU-NOT: apple_names38; GNU-NOT: debug_names39 40; NONE-NOT: apple_names41; NONE-NOT: debug_names42; NONE: debug_gnu_pub43 44@var = thread_local global i32 0, align 4, !dbg !045 46; Function Attrs: norecurse nounwind readnone uwtable47define void @_Z3funv() local_unnamed_addr #0 !dbg !11 {48  ret void, !dbg !1449}50 51; Function Attrs: norecurse uwtable52define weak_odr hidden ptr @_ZTW3var() local_unnamed_addr #1 {53  ret ptr @var54}55 56attributes #0 = { norecurse nounwind readnone uwtable }57attributes #1 = { norecurse uwtable }58 59!llvm.dbg.cu = !{!2}60!llvm.module.flags = !{!7, !8, !9}61!llvm.ident = !{!10}62 63!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())64!1 = distinct !DIGlobalVariable(name: "var", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)65!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, nameTableKind: GNU)66!3 = !DIFile(filename: "debugger-tune.cpp", directory: "/tmp")67!4 = !{}68!5 = !{!0}69!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)70!7 = !{i32 2, !"Dwarf Version", i32 4}71!8 = !{i32 2, !"Debug Info Version", i32 3}72!9 = !{i32 1, !"wchar_size", i32 4}73!10 = !{!"clang version 7.0.0 (trunk 322268) (llvm/trunk 322267)"}74!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)75!12 = !DISubroutineType(types: !13)76!13 = !{null}77!14 = !DILocation(line: 2, column: 13, scope: !11)78 79