Skip to content

Commit 6609864

Browse files
committed
Drop the ModuleDecl parameter from SILFunctionType::getWitnessMethodClass().
Nothing uses this parameter.
1 parent 2d1fc68 commit 6609864

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4010,7 +4010,7 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
40104010
/// If this is a @convention(witness_method) function with a class
40114011
/// constrained self parameter, return the class constraint for the
40124012
/// Self type.
4013-
ClassDecl *getWitnessMethodClass(ModuleDecl &M) const;
4013+
ClassDecl *getWitnessMethodClass() const;
40144014

40154015
/// If this is a @convention(witness_method) function, return the conformance
40164016
/// for which the method is a witness.

lib/SIL/SILFunctionType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CanType SILFunctionType::getSelfInstanceType() const {
9999
}
100100

101101
ClassDecl *
102-
SILFunctionType::getWitnessMethodClass(ModuleDecl &M) const {
102+
SILFunctionType::getWitnessMethodClass() const {
103103
auto selfTy = getSelfInstanceType();
104104
auto genericSig = getGenericSignature();
105105
if (auto paramTy = dyn_cast<GenericTypeParamType>(selfTy)) {

lib/SILOptimizer/Utils/Devirtualize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ swift::getWitnessMethodSubstitutions(SILModule &Module, ApplySite AI,
950950
auto *mod = Module.getSwiftModule();
951951
bool isSelfAbstract =
952952
witnessFnTy->getSelfInstanceType()->is<GenericTypeParamType>();
953-
auto *classWitness = witnessFnTy->getWitnessMethodClass(*mod);
953+
auto *classWitness = witnessFnTy->getWitnessMethodClass();
954954

955955
return ::getWitnessMethodSubstitutions(mod, CRef, requirementSig,
956956
witnessThunkSig, origSubs,

0 commit comments

Comments
 (0)