SILGen: Fix the logic of dynamic replacements for class constructors

To correctly call designated super class initializers the designated
intializer (and not the allocator) is dynamically replaceable.
Convenience allocators are dynamically replaceable as before.
This commit is contained in:
Arnold Schwaighofer
2019-02-18 13:16:12 -08:00
parent f820c6eb23
commit 8d9b9f328b
12 changed files with 144 additions and 22 deletions

View File

@@ -86,7 +86,7 @@ void SILFunctionBuilder::addFunctionAttributes(SILFunction *F,
return;
}
if (constant.isInitializerOrDestroyer())
if (!constant.canBeDynamicReplacement())
return;
SILDeclRef declRef(replacedDecl, constant.kind, false);