brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 62cecfd Raw
75 lines · plain
1; REQUIRES: asserts2; REQUIRES: x86-registered-target3 4;; Tests that we use correct accelerator table when processing nested TUs.5;; Assert is not triggered.6;; File17;; struct Foo {8;;   char f;9;; };10;; struct Foo2 {11;;   char f;12;;   Foo f1;13;; };14;; void fooFunc() {15;; Foo2 global2;16;; }17;; clang++ <file>.cpp -O0 -g2 -fdebug-types-section -gpubnames -S -emit-llvm -o <file>.ll18 19; RUN: llc -O0 -dwarf-version=5 -generate-type-units -filetype=obj < %s -o %t.o20; RUN: llvm-readelf --sections %t.o | FileCheck --check-prefix=OBJ %s21 22; OBJ: debug_names23 24; ModuleID = 'main.cpp'25source_filename = "main.cpp"26target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"27target triple = "x86_64-unknown-linux-gnu"28 29%struct.Foo2 = type { i8, %struct.Foo }30%struct.Foo = type { i8 }31 32; Function Attrs: mustprogress noinline nounwind optnone uwtable33define dso_local void @_Z7fooFuncv() #0 !dbg !10 {34entry:35  %global2 = alloca %struct.Foo2, align 136  call void @llvm.dbg.declare(metadata ptr %global2, metadata !14, metadata !DIExpression()), !dbg !2337  ret void, !dbg !2438}39 40; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)41declare void @llvm.dbg.declare(metadata, metadata, metadata) #142 43attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }44attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }45 46!llvm.dbg.cu = !{!0}47!llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8}48!llvm.ident = !{!9}49 50!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 18.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)51!1 = !DIFile(filename: "main.cpp", directory: "/smallMultipleTUs", checksumkind: CSK_MD5, checksum: "70bff4d50322126f3d8ca4178afad376")52!2 = !{i32 7, !"Dwarf Version", i32 5}53!3 = !{i32 2, !"Debug Info Version", i32 3}54!4 = !{i32 1, !"wchar_size", i32 4}55!5 = !{i32 8, !"PIC Level", i32 2}56!6 = !{i32 7, !"PIE Level", i32 2}57!7 = !{i32 7, !"uwtable", i32 2}58!8 = !{i32 7, !"frame-pointer", i32 2}59!9 = !{!"clang version 18.0.0git"}60!10 = distinct !DISubprogram(name: "fooFunc", linkageName: "_Z7fooFuncv", scope: !1, file: !1, line: 9, type: !11, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13)61!11 = !DISubroutineType(types: !12)62!12 = !{null}63!13 = !{}64!14 = !DILocalVariable(name: "global2", scope: !10, file: !1, line: 10, type: !15)65!15 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo2", file: !1, line: 4, size: 16, flags: DIFlagTypePassByValue, elements: !16, identifier: "_ZTS4Foo2")66!16 = !{!17, !19}67!17 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !15, file: !1, line: 5, baseType: !18, size: 8)68!18 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)69!19 = !DIDerivedType(tag: DW_TAG_member, name: "f1", scope: !15, file: !1, line: 6, baseType: !20, size: 8, offset: 8)70!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !1, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !21, identifier: "_ZTS3Foo")71!21 = !{!22}72!22 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !20, file: !1, line: 2, baseType: !18, size: 8)73!23 = !DILocation(line: 10, column: 6, scope: !10)74!24 = !DILocation(line: 11, column: 1, scope: !10)75