mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* spelling: accessible Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: accessories Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: allocated Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: amortizes Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: are Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: arguments Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: cacheable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: check Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: clazz Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: compatible Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: compilation Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: completely Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: construct Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: conversion Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: declarations Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: derivation Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: deserialization Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: destroyed Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: determined Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: different Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: doesn't Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: equality Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: equivalent Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: formation Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: forwards Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: global Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: guaranteed Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: have Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: identify Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inaccessible Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: indeterminate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: indices Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inefficient Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inheritance Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: instantaneous Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: instruction Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: intentionally Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: interior Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: intrinsic Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: introducing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: irrelevant Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: message Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: multi Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: necessarily Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: object Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: one Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: optimization Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: otherwise Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: parameter Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: pattern Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: pipeline Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: possibility Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: postdominance Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: providing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: reached Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: recognized Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: refrigerator Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: remaining Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: resilient Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: retrieve Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: scavenge Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: scheduled Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: separately Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: serializable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: signature Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: simplicity Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: specifically Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: substituted Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: substitution Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: subtypes Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: supplement Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: syntax Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: the Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: there Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: these Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: this Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: though Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: through Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: transitively Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: transpose Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: trivial Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: value Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: verification Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: visibility Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: weird Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: whole Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
118 lines
4.0 KiB
Plaintext
118 lines
4.0 KiB
Plaintext
// RUN: %target-sil-opt %s -module-name=witness_tables | %target-sil-opt -module-name=witness_tables | %FileCheck %s
|
|
|
|
protocol AssocReqt {
|
|
func requiredMethod()
|
|
}
|
|
|
|
struct ConformingAssoc : AssocReqt {
|
|
func requiredMethod()
|
|
}
|
|
|
|
sil @_TFV14witness_tables15ConformingAssoc14requiredMethodfS0_FT_T_ : $@convention(method) (ConformingAssoc) -> () {
|
|
bb0(%0 : $ConformingAssoc):
|
|
debug_value %0 : $ConformingAssoc
|
|
%2 = tuple ()
|
|
return %2 : $()
|
|
}
|
|
|
|
sil @_TTWV14witness_tables15ConformingAssocS_9AssocReqtS_FS1_14requiredMethodU_fRQPS1_FT_T_ : $@convention(witness_method: AssocReqt) (@inout ConformingAssoc) -> () {
|
|
bb0(%0 : $*ConformingAssoc):
|
|
%1 = load %0 : $*ConformingAssoc
|
|
%2 = function_ref @_TFV14witness_tables15ConformingAssoc14requiredMethodfS0_FT_T_ : $@convention(method) (ConformingAssoc) -> ()
|
|
%3 = apply %2(%1) : $@convention(method) (ConformingAssoc) -> ()
|
|
return %3 : $()
|
|
}
|
|
|
|
// CHECK-LABEL: sil_witness_table ConformingAssoc: AssocReqt module witness_tables {
|
|
// CHECK: #AssocReqt.requiredMethod: {{.*}} : @_TTWV14witness_tables15ConformingAssocS_9AssocReqtS_FS1_14requiredMethodU_fRQPS1_FT_T_
|
|
// CHECK: }
|
|
sil_witness_table ConformingAssoc: AssocReqt module witness_tables {
|
|
method #AssocReqt.requiredMethod: @_TTWV14witness_tables15ConformingAssocS_9AssocReqtS_FS1_14requiredMethodU_fRQPS1_FT_T_
|
|
}
|
|
|
|
protocol AnyProtocol {
|
|
associatedtype AssocType
|
|
associatedtype AssocWithReqt : AssocReqt
|
|
func assocTypesMethod(x: AssocType, y: AssocWithReqt)
|
|
static func staticMethod(x: Self)
|
|
}
|
|
class SomeAssoc {
|
|
}
|
|
protocol InheritedProtocol1 : AnyProtocol {
|
|
func inheritedMethod()
|
|
}
|
|
struct InheritedConformance : InheritedProtocol1 {
|
|
typealias AssocType = SomeAssoc
|
|
typealias AssocWithReqt = ConformingAssoc
|
|
func assocTypesMethod(x: SomeAssoc, y: ConformingAssoc)
|
|
static func staticMethod(x: InheritedConformance)
|
|
func inheritedMethod()
|
|
}
|
|
struct InheritedConformance2 : InheritedProtocol1 {
|
|
typealias AssocType = SomeAssoc
|
|
typealias AssocWithReqt = ConformingAssoc
|
|
func assocTypesMethod(x: SomeAssoc, y: ConformingAssoc)
|
|
static func staticMethod(x: InheritedConformance2)
|
|
func inheritedMethod()
|
|
}
|
|
|
|
|
|
// CHECK-LABEL: sil_witness_table InheritedConformance: InheritedProtocol1 module
|
|
// CHECK: base_protocol AnyProtocol: InheritedConformance: AnyProtocol module
|
|
// CHECK: }
|
|
sil_witness_table InheritedConformance: InheritedProtocol1 module witness_tables {
|
|
base_protocol AnyProtocol: InheritedConformance: AnyProtocol module witness_tables
|
|
}
|
|
|
|
// CHECK-LABEL: sil_witness_table shared InheritedConformance: AnyProtocol module
|
|
// CHECK: associated_type AssocType: SomeAssoc
|
|
// CHECK: associated_type_protocol (AssocWithReqt: AssocReqt): ConformingAssoc: AssocReqt module
|
|
// CHECK: }
|
|
sil_witness_table shared InheritedConformance: AnyProtocol module witness_tables {
|
|
associated_type AssocType: SomeAssoc
|
|
associated_type_protocol (AssocWithReqt: AssocReqt): ConformingAssoc: AssocReqt module witness_tables
|
|
}
|
|
|
|
// CHECK-LABEL: sil_witness_table InheritedConformance2: InheritedProtocol1 module witness_tables
|
|
// CHECK-NOT: }
|
|
sil_witness_table public_external InheritedConformance2: InheritedProtocol1 module witness_tables
|
|
// CHECK-LABEL: sil_witness_table public InheritedConformance2: AnyProtocol module witness_tables
|
|
// CHECK-NOT: }
|
|
sil_witness_table public InheritedConformance2: AnyProtocol module witness_tables
|
|
|
|
|
|
protocol Proto {
|
|
func abc()
|
|
}
|
|
|
|
class DeadMethodClass : Proto {
|
|
func abc()
|
|
}
|
|
|
|
// CHECK-LABEL: sil_witness_table DeadMethodClass: Proto module witness_tables
|
|
// CHECK: method #Proto.abc: {{.*}} : nil
|
|
// CHECK: }
|
|
sil_witness_table DeadMethodClass: Proto module witness_tables {
|
|
method #Proto.abc: nil
|
|
}
|
|
|
|
protocol P {
|
|
}
|
|
|
|
struct ConditionalStruct<T> {
|
|
init()
|
|
}
|
|
|
|
extension ConditionalStruct : P where T : P {
|
|
}
|
|
|
|
// CHECK-LABEL: sil_witness_table hidden <T where T : P> ConditionalStruct<T>: P module witness_tables {
|
|
// CHECK-NEXT: conditional_conformance (T: P): dependent
|
|
// CHECK-NEXT: }
|
|
sil_witness_table hidden <T where T : P> ConditionalStruct<T>: P module t4 {
|
|
conditional_conformance (T: P): dependent
|
|
}
|
|
|
|
sil_default_witness_table hidden P {
|
|
}
|