mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -86,7 +86,7 @@ void SILFunctionBuilder::addFunctionAttributes(SILFunction *F,
|
||||
return;
|
||||
}
|
||||
|
||||
if (constant.isInitializerOrDestroyer())
|
||||
if (!constant.canBeDynamicReplacement())
|
||||
return;
|
||||
|
||||
SILDeclRef declRef(replacedDecl, constant.kind, false);
|
||||
|
||||
Reference in New Issue
Block a user