Skip to content

Commit 6aa3abd

Browse files
authored
Merge pull request #37780 from artemcm/FixSwiftScanLoadCacheReturnCode
[DependencyScanning] Loading the scanner cache returns true on failure.
2 parents b3cd558 + 5440e2f commit 6aa3abd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/DependencyScan/DependencyScanningTool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ bool DependencyScanningTool::loadCache(llvm::StringRef path) {
9898
DiagnosticEngine Diags(SM);
9999
Diags.addConsumer(PDC);
100100
SharedCache = std::make_unique<ModuleDependenciesCache>();
101-
bool Success =
101+
bool readFailed =
102102
module_dependency_cache_serialization::readInterModuleDependenciesCache(
103103
path, *SharedCache);
104-
if (!Success) {
104+
if (readFailed) {
105105
Diags.diagnose(SourceLoc(), diag::warn_scaner_deserialize_failed, path);
106106
}
107-
return Success;
107+
return readFailed;
108108
}
109109

110110
void DependencyScanningTool::resetCache() {

0 commit comments

Comments
 (0)