Skip to content

Commit 1844c14

Browse files
committed
SIL: add var ClassMethodInst.member
1 parent 67556cf commit 1844c14

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,9 @@ final public class ApplyInst : SingleValueInstruction, FullApplySite {
12221222

12231223
final public class FunctionExtractIsolationInst : SingleValueInstruction {}
12241224

1225-
final public class ClassMethodInst : SingleValueInstruction, UnaryInstruction {}
1225+
final public class ClassMethodInst : SingleValueInstruction, UnaryInstruction {
1226+
public var member: DeclRef { DeclRef(bridged: bridged.ClassMethodInst_getMember()) }
1227+
}
12261228

12271229
final public class SuperMethodInst : SingleValueInstruction, UnaryInstruction {}
12281230

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ struct BridgedInstruction {
749749
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedGenericSpecializationInformation ApplyInst_getSpecializationInfo() const;
750750
BRIDGED_INLINE bool TryApplyInst_getNonAsync() const;
751751
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedGenericSpecializationInformation TryApplyInst_getSpecializationInfo() const;
752+
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclRef ClassMethodInst_getMember() const;
752753
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclRef WitnessMethodInst_getMember() const;
753754
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedCanType WitnessMethodInst_getLookupType() const;
754755
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclObj WitnessMethodInst_getLookupProtocol() const;

include/swift/SIL/SILBridgingImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,10 @@ BridgedGenericSpecializationInformation BridgedInstruction::TryApplyInst_getSpec
12431243
return {getAs<swift::TryApplyInst>()->getSpecializationInfo()};
12441244
}
12451245

1246+
BridgedDeclRef BridgedInstruction::ClassMethodInst_getMember() const {
1247+
return getAs<swift::ClassMethodInst>()->getMember();
1248+
}
1249+
12461250
BridgedDeclRef BridgedInstruction::WitnessMethodInst_getMember() const {
12471251
return getAs<swift::WitnessMethodInst>()->getMember();
12481252
}

0 commit comments

Comments
 (0)