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:
Erik Eckstein
2024-05-21 13:31:36 +02:00
parent 55a2a412dc
commit 1a32cfe426

View File

@@ -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 \