mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Remove linkage parameter from SILModule::createWitnessTableDeclaration()
All callers were doing the same thing here, so move it inside the function. Also, change getRootNormalConformance(), which is deprecated, to getRootConformance().
This commit is contained in:
@@ -144,8 +144,7 @@ void SILModule::deallocateInst(SILInstruction *I) {
|
||||
}
|
||||
|
||||
SILWitnessTable *
|
||||
SILModule::createWitnessTableDeclaration(ProtocolConformance *C,
|
||||
SILLinkage linkage) {
|
||||
SILModule::createWitnessTableDeclaration(const ProtocolConformance *C) {
|
||||
// If we are passed in a null conformance (a valid value), just return nullptr
|
||||
// since we cannot map a witness table to it.
|
||||
if (!C)
|
||||
@@ -153,7 +152,9 @@ SILModule::createWitnessTableDeclaration(ProtocolConformance *C,
|
||||
|
||||
// Extract the root conformance.
|
||||
auto rootC = C->getRootConformance();
|
||||
return SILWitnessTable::create(*this, linkage, rootC);
|
||||
auto linkage = getLinkageForProtocolConformance(rootC, NotForDefinition);
|
||||
return SILWitnessTable::create(*this, linkage,
|
||||
const_cast<RootProtocolConformance *>(rootC));
|
||||
}
|
||||
|
||||
SILWitnessTable *
|
||||
|
||||
Reference in New Issue
Block a user