brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 84be51e Raw
62 lines · plain
1; REQUIRES: object-emission2; AIX doesn't have full support for DWARF 53; XFAIL: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}4; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s5 6;; https://github.com/llvm/llvm-project/issues/1403627;; Don't assert when emitting a complex integer type in DWARF.8 9;; C source:10;; int g;11;;12;; void foo(_Complex short c) { __builtin_memmove(&g, (char *)&c, 2); }13;;14;; void bar() { foo(0); }15 16; CHECK: DW_AT_type ([[complex:0x[0-9a-f]+]] "complex")17 18; CHECK: [[complex]]: DW_TAG_base_type19; CHECK-NEXT: DW_AT_name        ("complex")20; CHECK-NEXT: DW_AT_encoding    (0x80)21; CHECK-NEXT: DW_AT_byte_size   (0x04)22 23@g = dso_local local_unnamed_addr global i32 0, align 4, !dbg !024 25define dso_local void @bar() local_unnamed_addr !dbg !18 {26entry:27    #dbg_value(i32 0, !21, !DIExpression(), !27)28  store i16 0, ptr @g, align 4, !dbg !2929  ret void, !dbg !3030}31 32!llvm.dbg.cu = !{!2}33!llvm.module.flags = !{!10, !11}34!llvm.ident = !{!17}35 36!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())37!1 = distinct !DIGlobalVariable(name: "g", scope: !2, file: !8, line: 1, type: !9, isLocal: false, isDefinition: true)38!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 22.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !7, splitDebugInlining: false, nameTableKind: None)39!3 = !DIFile(filename: "/app/example.cpp", directory: "/app")40!4 = !{!5}41!5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64)42!6 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)43!7 = !{!0}44!8 = !DIFile(filename: "example.cpp", directory: "/app")45!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)46!10 = !{i32 7, !"Dwarf Version", i32 5}47!11 = !{i32 2, !"Debug Info Version", i32 3}48!17 = !{!"clang version 22.0.0git"}49!18 = distinct !DISubprogram(name: "bar", linkageName: "bar()", scope: !8, file: !8, line: 5, type: !19, scopeLine: 5, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, keyInstructions: true)50!19 = !DISubroutineType(types: !20)51!20 = !{null}52!21 = !DILocalVariable(name: "c", arg: 1, scope: !22, file: !8, line: 3, type: !25)53!22 = distinct !DISubprogram(name: "foo", linkageName: "_ZL3fooCs", scope: !8, file: !8, line: 3, type: !23, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !26, keyInstructions: true)54!23 = !DISubroutineType(types: !24)55!24 = !{null, !25}56!25 = !DIBasicType(name: "complex", size: 32, encoding: 128)57!26 = !{!21}58!27 = !DILocation(line: 0, scope: !22, inlinedAt: !28)59!28 = distinct !DILocation(line: 5, column: 14, scope: !18)60!29 = !DILocation(line: 3, column: 37, scope: !22, inlinedAt: !28, atomGroup: 1, atomRank: 1)61!30 = !DILocation(line: 5, column: 22, scope: !18, atomGroup: 1, atomRank: 1)62