File tree 2 files changed +12
-2
lines changed 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,16 @@ namespace swift {
631
631
// / Return a hash code of any components from these options that should
632
632
// / contribute to a Swift Dependency Scanning hash.
633
633
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;
635
644
}
636
645
637
646
private:
Original file line number Diff line number Diff line change @@ -439,9 +439,10 @@ ModuleDependenciesCache::getDependencyReferencesMap(
439
439
ModuleDependenciesCache::ModuleDependenciesCache (
440
440
GlobalModuleDependenciesCache &globalCache,
441
441
std::string mainScanModuleName,
442
- std::string scanningContextHash )
442
+ std::string scannerContextHash )
443
443
: globalCache(globalCache),
444
444
mainScanModuleName(mainScanModuleName),
445
+ scannerContextHash(scannerContextHash),
445
446
clangScanningTool(globalCache.ClangScanningService) {
446
447
globalCache.configureForContextHash (scannerContextHash);
447
448
for (auto kind = ModuleDependenciesKind::FirstKind;
You can’t perform that action at this time.
0 commit comments