Skip to content

Commit 1a32cfe

Browse files
committed
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.
1 parent 55a2a41 commit 1a32cfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,8 +2029,14 @@ void IRGenModule::error(SourceLoc loc, const Twine &message) {
20292029

20302030
bool IRGenModule::useDllStorage() { return ::useDllStorage(Triple); }
20312031

2032+
// In embedded swift features are available independent of deployment and
2033+
// runtime targets because the runtime library is always statically linked
2034+
// to the program.
2035+
20322036
#define FEATURE(N, V) \
20332037
bool IRGenModule::is##N##FeatureAvailable(const ASTContext &context) { \
2038+
if (Context.LangOpts.hasFeature(Feature::Embedded)) \
2039+
return true; \
20342040
auto deploymentAvailability \
20352041
= AvailabilityContext::forDeploymentTarget(context); \
20362042
auto runtimeAvailability \

0 commit comments

Comments
 (0)