@@ -691,17 +691,20 @@ struct DenseMapInfo<swift::AttributedImport<ModuleInfo>> {
691
691
using ModuleInfoDMI = DenseMapInfo<ModuleInfo>;
692
692
using ImportOptionsDMI = DenseMapInfo<swift::ImportOptions>;
693
693
using StringRefDMI = DenseMapInfo<StringRef>;
694
- // FIXME: SPI groups not used by DenseMapInfo???
694
+ // We can't include spiGroups in the hash because ArrayRef<Identifier> is not
695
+ // DenseMapInfo-able, but we do check that the spiGroups match in isEqual().
695
696
696
697
static inline AttributedImport getEmptyKey () {
697
698
return AttributedImport (ModuleInfoDMI::getEmptyKey (),
698
699
ImportOptionsDMI::getEmptyKey (),
699
- StringRefDMI::getEmptyKey ());
700
+ StringRefDMI::getEmptyKey (),
701
+ {});
700
702
}
701
703
static inline AttributedImport getTombstoneKey () {
702
704
return AttributedImport (ModuleInfoDMI::getTombstoneKey (),
703
705
ImportOptionsDMI::getTombstoneKey (),
704
- StringRefDMI::getTombstoneKey ());
706
+ StringRefDMI::getTombstoneKey (),
707
+ {});
705
708
}
706
709
static inline unsigned getHashValue (const AttributedImport &import ) {
707
710
return detail::combineHashValue (
@@ -714,7 +717,8 @@ struct DenseMapInfo<swift::AttributedImport<ModuleInfo>> {
714
717
const AttributedImport &b) {
715
718
return ModuleInfoDMI::isEqual (a.module , b.module ) &&
716
719
ImportOptionsDMI::isEqual (a.options , b.options ) &&
717
- StringRefDMI::isEqual (a.sourceFileArg , b.sourceFileArg );
720
+ StringRefDMI::isEqual (a.sourceFileArg , b.sourceFileArg ) &&
721
+ a.spiGroups == b.spiGroups ;
718
722
}
719
723
};
720
724
}
0 commit comments