mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Frontend: Allow any experimental feature to be enabled when compiling a module.
When building a module from its interface, do not diagnose whether or not a feature is available in production compilers. This is important since older compilers may be expected to build .swiftinterfaces that were produced by newer compilers where the feature has been enabled by default. Resolves rdar://125500318
This commit is contained in:
@@ -276,10 +276,8 @@ void CompilerInstance::recordPrimaryInputBuffer(unsigned BufID) {
|
||||
}
|
||||
|
||||
bool CompilerInstance::setUpASTContextIfNeeded() {
|
||||
if ((Invocation.getFrontendOptions().RequestedAction ==
|
||||
FrontendOptions::ActionType::CompileModuleFromInterface ||
|
||||
Invocation.getFrontendOptions().RequestedAction ==
|
||||
FrontendOptions::ActionType::TypecheckModuleFromInterface) &&
|
||||
if (FrontendOptions::doesActionBuildModuleFromInterface(
|
||||
Invocation.getFrontendOptions().RequestedAction) &&
|
||||
!Invocation.getFrontendOptions().ExplicitInterfaceBuild) {
|
||||
// Compiling a module interface from source uses its own CompilerInstance
|
||||
// with options read from the input file. Don't bother setting up an
|
||||
|
||||
Reference in New Issue
Block a user