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