@@ -245,7 +245,7 @@ resolveDirectDependencies(CompilerInstance &instance, ModuleDependencyID module,
245245 return std::vector<ModuleDependencyID>(result.begin (), result.end ());
246246}
247247
248- static void discoverCrosssImportOverlayDependencies (
248+ static void discoverCrossImportOverlayDependencies (
249249 CompilerInstance &instance, StringRef mainModuleName,
250250 ArrayRef<ModuleDependencyID> allDependencies,
251251 ModuleDependenciesCache &cache, InterfaceSubContextDelegate &ASTDelegate,
@@ -316,7 +316,7 @@ static void discoverCrosssImportOverlayDependencies(
316316 std::set<ModuleDependencyID>>
317317 allModules;
318318
319- // Seed the all module list from the dummpy main module.
319+ // Seed the all module list from the dummy main module.
320320 allModules.insert ({dummyMainName.str (), dummyMainDependencies.getKind ()});
321321
322322 // Explore the dependencies of every module.
@@ -1024,9 +1024,9 @@ static void updateCachedInstanceOpts(CompilerInstance &cachedInstance,
10241024 cachedInstance.getASTContext ().SearchPathOpts =
10251025 invocationInstance.getASTContext ().SearchPathOpts ;
10261026
1027- // The Clang Importer arguments must consiste of a combination of
1027+ // The Clang Importer arguments must consist of a combination of
10281028 // Clang Importer arguments of the current invocation to inherit its Clang-specific
1029- // search path options, followed by the options speicific to the given batch-entry,
1029+ // search path options, followed by the options specific to the given batch-entry,
10301030 // which may overload some of the invocation's options (e.g. target)
10311031 cachedInstance.getASTContext ().ClangImporterOpts =
10321032 invocationInstance.getASTContext ().ClangImporterOpts ;
@@ -1053,7 +1053,7 @@ forEachBatchEntry(CompilerInstance &invocationInstance,
10531053 llvm::function_ref<void (BatchScanInput, CompilerInstance &,
10541054 ModuleDependenciesCache &)>
10551055 scanningAction) {
1056- const CompilerInvocation &invok = invocationInstance.getInvocation ();
1056+ const CompilerInvocation &invoke = invocationInstance.getInvocation ();
10571057 bool localSubInstanceMap = false ;
10581058 CompilerArgInstanceCacheMap *subInstanceMap;
10591059 if (versionedPCMInstanceCache)
@@ -1082,7 +1082,7 @@ forEachBatchEntry(CompilerInstance &invocationInstance,
10821082 // those of the current scanner invocation.
10831083 updateCachedInstanceOpts (*pInstance, invocationInstance, entry.arguments );
10841084 } else {
1085- // We must reset option occurences because we are handling an unrelated command-line
1085+ // We must reset option occurrences because we are handling an unrelated command-line
10861086 // to those parsed before. We must do so because LLVM options parsing is done
10871087 // using a managed static `GlobalParser`.
10881088 llvm::cl::ResetAllOptionOccurrences ();
@@ -1100,15 +1100,15 @@ forEachBatchEntry(CompilerInstance &invocationInstance,
11001100 pCache = std::get<2 >((*subInstanceMap)[entry.arguments ]).get ();
11011101 SmallVector<const char *, 4 > args;
11021102 llvm::cl::TokenizeGNUCommandLine (entry.arguments , saver, args);
1103- CompilerInvocation subInvok = invok ;
1103+ CompilerInvocation subInvoke = invoke ;
11041104 pInstance->addDiagnosticConsumer (&FDC);
1105- if (subInvok .parseArgs (args, diags)) {
1105+ if (subInvoke .parseArgs (args, diags)) {
11061106 invocationInstance.getDiags ().diagnose (
11071107 SourceLoc (), diag::scanner_arguments_invalid, entry.arguments );
11081108 return true ;
11091109 }
11101110 std::string InstanceSetupError;
1111- if (pInstance->setup (subInvok , InstanceSetupError)) {
1111+ if (pInstance->setup (subInvoke , InstanceSetupError)) {
11121112 invocationInstance.getDiags ().diagnose (
11131113 SourceLoc (), diag::scanner_arguments_invalid, entry.arguments );
11141114 return true ;
@@ -1434,13 +1434,13 @@ swift::dependencies::performModuleScan(CompilerInstance &instance,
14341434 }
14351435
14361436 // We have all explicit imports now, resolve cross import overlays.
1437- discoverCrosssImportOverlayDependencies (
1437+ discoverCrossImportOverlayDependencies (
14381438 instance, mainModuleName,
14391439 /* All transitive dependencies*/ allModules.getArrayRef ().slice (1 ), cache,
14401440 ASTDelegate, [&](ModuleDependencyID id) { allModules.insert (id); },
14411441 currentImportPathSet);
14421442
1443- // Dignose cycle in dependency graph.
1443+ // Diagnose cycle in dependency graph.
14441444 if (diagnoseCycle (instance, cache, /* MainModule*/ allModules.front (),
14451445 ASTDelegate))
14461446 return std::make_error_code (std::errc::not_supported);
0 commit comments