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