@@ -1553,38 +1553,13 @@ void CompilerInstance::setMainModule(ModuleDecl *newMod) {
1553
1553
Context->MainModule = newMod;
1554
1554
}
1555
1555
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
-
1578
1556
bool CompilerInstance::performParseAndResolveImportsOnly () {
1579
1557
FrontendStatsTracer tracer (getStatsReporter (), " parse-and-resolve-imports" );
1580
1558
1581
1559
// NOTE: Do not add new logic to this function, use the request evaluator to
1582
1560
// lazily evaluate instead. Once the below computations are requestified we
1583
1561
// ought to be able to remove this function.
1584
1562
1585
- // Load access notes.
1586
- loadAccessNotesIfNeeded ();
1587
-
1588
1563
// Resolve imports for all the source files in the module.
1589
1564
auto *mainModule = getMainModule ();
1590
1565
performImportResolution (mainModule);
0 commit comments