xref: /aosp_15_r20/external/llvm/test/DebugInfo/COFF/anonymous-struct.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -filetype=obj | llvm-readobj - -codeview | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; C++ source to regenerate:
4*9880d681SAndroid Build Coastguard Worker; struct S {
5*9880d681SAndroid Build Coastguard Worker;   int x;
6*9880d681SAndroid Build Coastguard Worker;   struct { int a; } ;
7*9880d681SAndroid Build Coastguard Worker; } s;
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; CHECK: CodeViewTypes [
10*9880d681SAndroid Build Coastguard Worker; CHECK:  FieldList ([[S_fl:.*]]) {
11*9880d681SAndroid Build Coastguard Worker; CHECK:    TypeLeafKind: LF_FIELDLIST (0x1203)
12*9880d681SAndroid Build Coastguard Worker; CHECK:    DataMember {
13*9880d681SAndroid Build Coastguard Worker; CHECK:      Type: int (0x74)
14*9880d681SAndroid Build Coastguard Worker; CHECK:      FieldOffset: 0x0
15*9880d681SAndroid Build Coastguard Worker; CHECK:      Name: x
16*9880d681SAndroid Build Coastguard Worker; CHECK:    }
17*9880d681SAndroid Build Coastguard Worker; CHECK:    DataMember {
18*9880d681SAndroid Build Coastguard Worker; CHECK:      Type: int (0x74)
19*9880d681SAndroid Build Coastguard Worker; CHECK:      FieldOffset: 0x4
20*9880d681SAndroid Build Coastguard Worker; CHECK:      Name: a
21*9880d681SAndroid Build Coastguard Worker; CHECK:    }
22*9880d681SAndroid Build Coastguard Worker; CHECK:  }
23*9880d681SAndroid Build Coastguard Worker; CHECK:  Struct ({{.*}}) {
24*9880d681SAndroid Build Coastguard Worker; CHECK:    TypeLeafKind: LF_STRUCTURE (0x1505)
25*9880d681SAndroid Build Coastguard Worker; CHECK:    MemberCount: 2
26*9880d681SAndroid Build Coastguard Worker; CHECK:    Properties [ (0x0)
27*9880d681SAndroid Build Coastguard Worker; CHECK:    ]
28*9880d681SAndroid Build Coastguard Worker; CHECK:    FieldList: <field list> ([[S_fl]])
29*9880d681SAndroid Build Coastguard Worker; CHECK:    SizeOf: 8
30*9880d681SAndroid Build Coastguard Worker; CHECK:    Name: S
31*9880d681SAndroid Build Coastguard Worker; CHECK:  }
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
34*9880d681SAndroid Build Coastguard Workertarget triple = "i686-pc-windows-msvc18.0.0"
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker%struct.S = type { i32, %struct.anon }
37*9880d681SAndroid Build Coastguard Worker%struct.anon = type { i32 }
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker@s = common global %struct.S zeroinitializer, align 4
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
42*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!14, !15}
43*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!16}
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 274261) (llvm/trunk 274262)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
46*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "-", directory: "/usr/local/google/home/majnemer/llvm/src")
47*9880d681SAndroid Build Coastguard Worker!2 = !{}
48*9880d681SAndroid Build Coastguard Worker!3 = !{!4}
49*9880d681SAndroid Build Coastguard Worker!4 = distinct !DIGlobalVariable(name: "s", scope: !0, file: !5, line: 5, type: !6, isLocal: false, isDefinition: true, variable: %struct.S* @s)
50*9880d681SAndroid Build Coastguard Worker!5 = !DIFile(filename: "<stdin>", directory: "/usr/local/google/home/majnemer/llvm/src")
51*9880d681SAndroid Build Coastguard Worker!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !5, line: 2, size: 64, align: 32, elements: !7)
52*9880d681SAndroid Build Coastguard Worker!7 = !{!8, !10}
53*9880d681SAndroid Build Coastguard Worker!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !5, line: 3, baseType: !9, size: 32, align: 32)
54*9880d681SAndroid Build Coastguard Worker!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
55*9880d681SAndroid Build Coastguard Worker!10 = !DIDerivedType(tag: DW_TAG_member, scope: !6, file: !5, line: 4, baseType: !11, size: 32, align: 32, offset: 32)
56*9880d681SAndroid Build Coastguard Worker!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !6, file: !5, line: 4, size: 32, align: 32, elements: !12)
57*9880d681SAndroid Build Coastguard Worker!12 = !{!13}
58*9880d681SAndroid Build Coastguard Worker!13 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !11, file: !5, line: 4, baseType: !9, size: 32, align: 32)
59*9880d681SAndroid Build Coastguard Worker!14 = !{i32 2, !"CodeView", i32 1}
60*9880d681SAndroid Build Coastguard Worker!15 = !{i32 2, !"Debug Info Version", i32 3}
61*9880d681SAndroid Build Coastguard Worker!16 = !{!"clang version 3.9.0 (trunk 274261) (llvm/trunk 274262)"}
62