mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
eb420df888
Marker protocols are a compile time concept only, and emit no metadata. RemoteInspection does not know how to handle existentials with these types. This patch emits debug info for marker protocols, so LLDB can handle them properly before querying RemoteInspection for type information. rdar://172847891
17 lines
496 B
Swift
17 lines
496 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
|
|
|
|
|
|
@_marker protocol MyMarker {}
|
|
|
|
struct ConformingType: MyMarker {
|
|
}
|
|
|
|
func f() {
|
|
let x: any MyMarker = ConformingType()
|
|
}
|
|
|
|
// Marker protocol should have the swift_marker annotation.
|
|
// CHECK-DAG: ![[MARKER:[0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "MyMarker"{{.*}}annotations: ![[ANNOT:[0-9]+]]
|
|
// CHECK-DAG: ![[ANNOT]] = !{![[ENTRY:[0-9]+]]}
|
|
// CHECK-DAG: ![[ENTRY]] = !{!"swift.MarkerProtocol", i1 true}
|