mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add predicates to check if a SILModule is representing the (optimized) OnoneSupport
It is cleaner to use these predicates rather than checking for a complex condition in different places.
This commit is contained in:
@@ -2440,8 +2440,7 @@ static bool linkSpecialization(SILModule &M, SILFunction *F) {
|
||||
// Do not remove functions that are known prespecializations.
|
||||
// Keep them around. Change their linkage to public, so that other
|
||||
// applications can refer to them.
|
||||
if (M.getOptions().Optimization >= SILOptions::SILOptMode::Optimize &&
|
||||
F->getModule().getSwiftModule()->getName().str() == SWIFT_ONONE_SUPPORT) {
|
||||
if (M.isOptimizedOnoneSupportModule()) {
|
||||
if (isKnownPrespecialization(F->getName())) {
|
||||
keepSpecializationAsPublic(F);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user