@@ -1553,38 +1553,13 @@ void CompilerInstance::setMainModule(ModuleDecl *newMod) {
15531553 Context->MainModule = newMod;
15541554}
15551555
1556- void CompilerInstance::loadAccessNotesIfNeeded () {
1557- if (Invocation.getLangOptions ().AccessNotesPath .empty ())
1558- return ;
1559-
1560- auto *mainModule = getMainModule ();
1561-
1562- auto accessNotesPath = Invocation.getLangOptions ().AccessNotesPath ;
1563-
1564- auto bufferOrError =
1565- swift::vfs::getFileOrSTDIN (getFileSystem (), accessNotesPath);
1566- if (bufferOrError) {
1567- int sourceID = SourceMgr.addNewSourceBuffer (std::move (bufferOrError.get ()));
1568- auto buffer = SourceMgr.getLLVMSourceMgr ().getMemoryBuffer (sourceID);
1569-
1570- if (auto accessNotesFile = AccessNotesFile::load (*Context, buffer))
1571- mainModule->getAccessNotes () = *accessNotesFile;
1572- } else {
1573- Diagnostics.diagnose (SourceLoc (), diag::access_notes_file_io_error,
1574- accessNotesPath, bufferOrError.getError ().message ());
1575- }
1576- }
1577-
15781556bool CompilerInstance::performParseAndResolveImportsOnly () {
15791557 FrontendStatsTracer tracer (getStatsReporter (), " parse-and-resolve-imports" );
15801558
15811559 // NOTE: Do not add new logic to this function, use the request evaluator to
15821560 // lazily evaluate instead. Once the below computations are requestified we
15831561 // ought to be able to remove this function.
15841562
1585- // Load access notes.
1586- loadAccessNotesIfNeeded ();
1587-
15881563 // Resolve imports for all the source files in the module.
15891564 auto *mainModule = getMainModule ();
15901565 performImportResolution (mainModule);
0 commit comments