mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: disable feature availability checking for embedded swift.
In embedded swift features are available independent of deployment and runtime targets because the runtime library is always statically linked to the program.
This commit is contained in:
@@ -2029,8 +2029,14 @@ void IRGenModule::error(SourceLoc loc, const Twine &message) {
|
||||
|
||||
bool IRGenModule::useDllStorage() { return ::useDllStorage(Triple); }
|
||||
|
||||
// In embedded swift features are available independent of deployment and
|
||||
// runtime targets because the runtime library is always statically linked
|
||||
// to the program.
|
||||
|
||||
#define FEATURE(N, V) \
|
||||
bool IRGenModule::is##N##FeatureAvailable(const ASTContext &context) { \
|
||||
if (Context.LangOpts.hasFeature(Feature::Embedded)) \
|
||||
return true; \
|
||||
auto deploymentAvailability \
|
||||
= AvailabilityContext::forDeploymentTarget(context); \
|
||||
auto runtimeAvailability \
|
||||
|
||||
Reference in New Issue
Block a user