Skip to content

Commit cc0c488

Browse files
committed
[DebugInfo] Add -gdwarf-types tests for classes
1 parent 3352e7d commit cc0c488

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

test/DebugInfo/BuiltinStdlibTypes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
// always be emitted.
55

66
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sBoD",
7-
// CHECK-SAME: size: 64, num_extra_inhabitants: 2147483647, flags: DIFlagArtificial,
7+
// CHECK-SAME: size: 64, num_extra_inhabitants: {{2147483647|4096}}, flags: DIFlagArtificial,
88
// CHECK-SAME: runtimeLang: DW_LANG_Swift)
99

1010
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$syXlD",
1111
// CHECK-SAME: size: 64,
1212

1313
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sBbD",
14-
// CHECK-SAME: size: 64, num_extra_inhabitants: 2147483647, flags: DIFlagArtificial,
14+
// CHECK-SAME: size: 64, num_extra_inhabitants: {{2147483647|4096}}, flags: DIFlagArtificial,
1515
// CHECK-SAME: runtimeLang: DW_LANG_Swift)
1616

1717
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sBpD",

test/DebugInfo/classes.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %target-swift-frontend -primary-file %s -emit-ir -gdwarf-types -o - | %FileCheck %s
2+
3+
class SomeClass {
4+
let first = 4
5+
let second = "Hello"
6+
}
7+
8+
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "SomeClass",
9+
// CHECK-SAME: size: 64, elements:
10+
// CHECK-SAME: runtimeLang: DW_LANG_Swift, identifier: "$s7classes9SomeClassCD")
11+
12+
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "first",
13+
// CHECK-SAME: size: 64)
14+
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "second",
15+
// CHECK-SAME: size: 128, offset: 64)

0 commit comments

Comments
 (0)