File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,16 @@ namespace swift {
631631 // / Return a hash code of any components from these options that should
632632 // / contribute to a Swift Dependency Scanning hash.
633633 llvm::hash_code getModuleScanningHashComponents () const {
634- return getPCHHashComponents ();
634+ auto hashValue = getPCHHashComponents ();
635+ if (TargetVariant.hasValue ())
636+ hashValue = llvm::hash_combine (hashValue, TargetVariant.getValue ().str ());
637+ if (ClangTarget.hasValue ())
638+ hashValue = llvm::hash_combine (hashValue, ClangTarget.getValue ().str ());
639+ if (SDKVersion.hasValue ())
640+ hashValue = llvm::hash_combine (hashValue, SDKVersion.getValue ().getAsString ());
641+ if (VariantSDKVersion.hasValue ())
642+ hashValue = llvm::hash_combine (hashValue, VariantSDKVersion.getValue ().getAsString ());
643+ return hashValue;
635644 }
636645
637646 private:
Original file line number Diff line number Diff line change @@ -439,9 +439,10 @@ ModuleDependenciesCache::getDependencyReferencesMap(
439439ModuleDependenciesCache::ModuleDependenciesCache (
440440 GlobalModuleDependenciesCache &globalCache,
441441 std::string mainScanModuleName,
442- std::string scanningContextHash )
442+ std::string scannerContextHash )
443443 : globalCache(globalCache),
444444 mainScanModuleName(mainScanModuleName),
445+ scannerContextHash(scannerContextHash),
445446 clangScanningTool(globalCache.ClangScanningService) {
446447 globalCache.configureForContextHash (scannerContextHash);
447448 for (auto kind = ModuleDependenciesKind::FirstKind;
You can’t perform that action at this time.
0 commit comments