Reinstate "GenericSpecializer: When specializing a generic function, convert indirect parameters/result to direct parameters/result.""

This reinstates commit 4187959e66.

The exposed crash in the ClosureSpecializer is fixed.
This commit is contained in:
Erik Eckstein
2016-02-26 13:50:46 -08:00
parent 0c2ca94ef7
commit 3a83cee006
18 changed files with 964 additions and 298 deletions

View File

@@ -220,7 +220,8 @@ SILFunction *SILModule::getOrCreateFunction(SILLocation loc,
SILFunction::ClassVisibility_t CV) {
if (auto fn = lookUpFunction(name)) {
assert(fn->getLoweredFunctionType() == type);
assert(fn->getLinkage() == linkage);
assert(fn->getLinkage() == linkage ||
stripExternalFromLinkage(fn->getLinkage()) == linkage);
return fn;
}