@@ -370,11 +370,11 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
370370}
371371
372372static void emitIndexDataForSourceFile (SourceFile &PrimarySourceFile,
373- StringRef IndexStorePath,
374- StringRef IndexUnitOutputPath,
373+ IndexStoreOptions IndexOpts,
375374 const CompilerInstance &Instance) {
376375 const auto &Invocation = Instance.getInvocation ();
377- const auto &Opts = Invocation.getFrontendOptions ();
376+ // FIXME: Compiler arguments should be the default for setting options, but this is currently broken (see PR #69076)
377+ // const auto &Opts = Invocation.getFrontendOptions();
378378
379379 bool isDebugCompilation;
380380 switch (Invocation.getSILOptions ().OptMode ) {
@@ -388,14 +388,15 @@ static void emitIndexDataForSourceFile(SourceFile &PrimarySourceFile,
388388 break ;
389389 }
390390
391- (void ) index::indexAndRecord (&PrimarySourceFile, IndexUnitOutputPath,
392- IndexStorePath,
393- !Opts.IndexIgnoreClangModules ,
394- Opts.IndexSystemModules ,
395- Opts.IndexIgnoreStdlib ,
396- Opts.IndexIncludeLocals ,
391+ (void ) index::indexAndRecord (&PrimarySourceFile,
392+ IndexOpts.IndexUnitOutputPath ,
393+ IndexOpts.IndexStorePath ,
394+ !IndexOpts.IgnoreClangModules ,
395+ IndexOpts.IncludeSystemModules ,
396+ IndexOpts.IgnoreStdlib ,
397+ IndexOpts.IncludeLocals ,
397398 isDebugCompilation,
398- Opts .DisableImplicitModules ,
399+ IndexOpts .DisableImplicitModules ,
399400 Invocation.getTargetTriple (),
400401 *Instance.getDependencyTracker (),
401402 Invocation.getIRGenOptions ().FilePrefixMap );
@@ -425,8 +426,7 @@ void SwiftLangSupport::indexToStore(
425426 void handlePrimaryAST (ASTUnitRef AstUnit) override {
426427 auto &SF = AstUnit->getPrimarySourceFile ();
427428 auto &CI = AstUnit->getCompilerInstance ();
428- emitIndexDataForSourceFile (
429- SF, Opts.IndexStorePath , Opts.IndexUnitOutputPath , CI);
429+ emitIndexDataForSourceFile (SF, Opts, CI);
430430 Receiver (RequestResult<IndexStoreInfo>::fromResult (IndexStoreInfo{}));
431431 }
432432
0 commit comments