mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #61844 from xedin/rdar-99884335
[Basic] Make it possible to access some experimental features in production compilers
This commit is contained in:
@@ -635,9 +635,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
// (non-release) builds for testing purposes.
|
||||
if (auto feature = getExperimentalFeature(A->getValue())) {
|
||||
#ifdef NDEBUG
|
||||
Diags.diagnose(SourceLoc(),
|
||||
diag::error_experimental_feature_not_available,
|
||||
A->getValue());
|
||||
if (!isFeatureAvailableInProduction(*feature)) {
|
||||
Diags.diagnose(SourceLoc(),
|
||||
diag::error_experimental_feature_not_available,
|
||||
A->getValue());
|
||||
}
|
||||
#endif
|
||||
|
||||
Opts.Features.insert(*feature);
|
||||
|
||||
Reference in New Issue
Block a user