mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
for recursive classes. This is achieved by treating types created with DebugTypeInfo::createFrowardDecl() as unconditional forward declarations when emitting debug info instead of applying a heuristic to determine this. rdar://146688269
12 lines
486 B
Swift
12 lines
486 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -gdwarf-types -o - | %FileCheck %s
|
|
// CHECK: !DICompositeType(tag: DW_TAG_variant_part, {{.*}}elements: ![[ELTS:[0-9]+]])
|
|
// CHECK: ![[ELTS]] = !{![[ML:[0-9]+]], ![[MR:[0-9]+]]}
|
|
// CHECK: ![[ML]] = !DIDerivedType(tag: DW_TAG_member, name: "left",
|
|
// CHECK: ![[MR]] = !DIDerivedType(tag: DW_TAG_member, name: "right",
|
|
enum Either<Left, Right> {
|
|
case left(Left)
|
|
case right(Right)
|
|
}
|
|
|
|
let either = Either<Int, Double>.left(1234)
|