@@ -300,15 +300,13 @@ struct ModuleInterfaceLoaderOptions {
300
300
bool disableImplicitSwiftModule = false ;
301
301
bool disableBuildingInterface = false ;
302
302
bool downgradeInterfaceVerificationError = false ;
303
- bool ignoreInterfaceProvidedOptions = false ;
304
303
std::string mainExecutablePath;
305
304
ModuleInterfaceLoaderOptions (const FrontendOptions &Opts):
306
305
remarkOnRebuildFromInterface (Opts.RemarkOnRebuildFromModuleInterface),
307
306
disableInterfaceLock (Opts.DisableInterfaceFileLock),
308
307
disableImplicitSwiftModule (Opts.DisableImplicitModules),
309
308
disableBuildingInterface (Opts.DisableBuildingInterface),
310
309
downgradeInterfaceVerificationError (Opts.DowngradeInterfaceVerificationError),
311
- ignoreInterfaceProvidedOptions(Opts.IgnoreInterfaceProvidedOptions),
312
310
mainExecutablePath(Opts.MainExecutablePath)
313
311
{
314
312
switch (Opts.RequestedAction ) {
@@ -442,6 +440,21 @@ class ModuleInterfaceLoader : public SerializedModuleLoaderBase {
442
440
bool SerializeDependencyHashes,
443
441
bool TrackSystemDependencies, ModuleInterfaceLoaderOptions Opts,
444
442
RequireOSSAModules_t RequireOSSAModules);
443
+
444
+ // / Unconditionally build \p InPath (a swiftinterface file) to \p OutPath (as
445
+ // / a swiftmodule file).
446
+ // /
447
+ // / Unlike the above `buildSwiftModuleFromSwiftInterface`, this method
448
+ // / bypasses the instantiation of a `CompilerInstance` from the compiler
449
+ // / configuration flags in the interface and instead directly uses the
450
+ // / supplied \p Instance
451
+ static bool buildExplicitSwiftModuleFromSwiftInterface (
452
+ CompilerInstance &Instance, const StringRef moduleCachePath,
453
+ const StringRef backupInterfaceDir, const StringRef prebuiltCachePath,
454
+ const StringRef ABIDescriptorPath, StringRef interfacePath,
455
+ StringRef outputPath, bool ShouldSerializeDeps,
456
+ ArrayRef<std::string> CompiledCandidates, StringRef CompilerVersion,
457
+ DependencyTracker *tracker = nullptr );
445
458
};
446
459
447
460
struct InterfaceSubContextDelegateImpl : InterfaceSubContextDelegate {
@@ -476,8 +489,7 @@ struct InterfaceSubContextDelegateImpl: InterfaceSubContextDelegate {
476
489
SmallVectorImpl<const char *> &SubArgs,
477
490
std::string &CompilerVersion,
478
491
StringRef interfacePath,
479
- SourceLoc diagnosticLoc,
480
- bool ignoreInterfaceProvidedOptions);
492
+ SourceLoc diagnosticLoc);
481
493
public:
482
494
InterfaceSubContextDelegateImpl (
483
495
SourceManager &SM, DiagnosticEngine *Diags,
@@ -492,15 +504,13 @@ struct InterfaceSubContextDelegateImpl: InterfaceSubContextDelegate {
492
504
StringRef interfacePath,
493
505
StringRef outputPath,
494
506
SourceLoc diagLoc,
495
- bool ignoreInterfaceProvidedOptions,
496
507
llvm::function_ref<std::error_code(ASTContext&, ModuleDecl*,
497
508
ArrayRef<StringRef>, ArrayRef<StringRef>,
498
509
StringRef)> action) override ;
499
510
std::error_code runInSubCompilerInstance (StringRef moduleName,
500
511
StringRef interfacePath,
501
512
StringRef outputPath,
502
513
SourceLoc diagLoc,
503
- bool ignoreInterfaceProvidedOptions,
504
514
llvm::function_ref<std::error_code(SubCompilerInstanceInfo&)> action) override ;
505
515
506
516
~InterfaceSubContextDelegateImpl () = default ;
0 commit comments