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:
Michael Gottesman
2014-03-22 05:05:47 +00:00
parent 084d468236
commit 3ad6f33202
9 changed files with 115 additions and 0 deletions

View File

@@ -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,