mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Teach the generic specializer how to create SILWitnessTable declarations if a specialized conformance does not have a witness table.
This also teaches IRGen not to emit WitnessTable declarations. This causes them to be left as unknown symbols in the resulting executable. Swift SVN r15361
This commit is contained in:
@@ -537,6 +537,10 @@ public:
|
||||
SILType MethodTy,
|
||||
bool Volatile = false)
|
||||
{
|
||||
assert((!Conformance ||
|
||||
F.getModule().lookUpWitnessTable(Conformance).first) &&
|
||||
"Can not create a witness method inst for a conformance that does "
|
||||
"not have a witness table mapped to it.");
|
||||
return insert(new (F.getModule())
|
||||
WitnessMethodInst(Loc, LookupTy, Conformance,
|
||||
Member, MethodTy,
|
||||
|
||||
@@ -308,6 +308,11 @@ public:
|
||||
std::pair<SILWitnessTable *, ArrayRef<Substitution>>
|
||||
lookUpWitnessTable(const ProtocolConformance *C);
|
||||
|
||||
// Given a protocol conformance, attempt to create a witness table declaration
|
||||
// for it.
|
||||
SILWitnessTable *
|
||||
createWitnessTableDeclaration(ProtocolConformance *C);
|
||||
|
||||
/// \brief Return the stage of processing this module is at.
|
||||
SILStage getStage() const { return Stage; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user