File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
include/swift/Localization Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class LocalizationWriterInfo {
69
69
using hash_value_type = uint32_t ;
70
70
using offset_type = uint32_t ;
71
71
72
- hash_value_type ComputeHash (key_type_ref key) { return llvm::hash_code ( key) ; }
72
+ hash_value_type ComputeHash (key_type_ref key) { return key; }
73
73
74
74
std::pair<offset_type, offset_type> EmitKeyDataLength (llvm::raw_ostream &out,
75
75
key_type_ref key,
@@ -113,7 +113,7 @@ class LocalizationReaderInfo {
113
113
}
114
114
115
115
hash_value_type ComputeHash (internal_key_type key) {
116
- return llvm::hash_code ( key) ;
116
+ return key;
117
117
}
118
118
119
119
static std::pair<offset_type, offset_type>
Original file line number Diff line number Diff line change @@ -1142,7 +1142,7 @@ namespace {
1142
1142
}
1143
1143
1144
1144
hash_value_type ComputeHash (key_type_ref key) {
1145
- return llvm::DenseMapInfo<SerializedSwiftName>:: getHashValue (key);
1145
+ return static_cast < unsigned >(key. Kind ) + llvm::djbHash (key. Name );
1146
1146
}
1147
1147
1148
1148
std::pair<unsigned , unsigned > EmitKeyDataLength (raw_ostream &out,
@@ -1421,7 +1421,7 @@ namespace {
1421
1421
}
1422
1422
1423
1423
hash_value_type ComputeHash (internal_key_type key) {
1424
- return llvm::DenseMapInfo<SerializedSwiftName>:: getHashValue (key);
1424
+ return static_cast < unsigned >(key. Kind ) + llvm::djbHash (key. Name );
1425
1425
}
1426
1426
1427
1427
static bool EqualKey (internal_key_type lhs, internal_key_type rhs) {
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ class ModuleFileSharedCore::DeclMembersTableInfo {
318
318
}
319
319
320
320
hash_value_type ComputeHash (internal_key_type key) {
321
- return llvm::hash_value ( key) ;
321
+ return key;
322
322
}
323
323
324
324
static bool EqualKey (internal_key_type lhs, internal_key_type rhs) {
@@ -557,7 +557,7 @@ class ModuleFileSharedCore::DeclFingerprintsTableInfo {
557
557
internal_key_type GetInternalKey (external_key_type ID) { return ID; }
558
558
559
559
hash_value_type ComputeHash (internal_key_type key) {
560
- return llvm::hash_value ( key) ;
560
+ return key;
561
561
}
562
562
563
563
static bool EqualKey (internal_key_type lhs, internal_key_type rhs) {
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ namespace {
414
414
using offset_type = unsigned ;
415
415
416
416
hash_value_type ComputeHash (key_type_ref key) {
417
- return llvm::hash_value ( static_cast <uint32_t >(key) );
417
+ return static_cast <uint32_t >(key);
418
418
}
419
419
420
420
std::pair<unsigned , unsigned > EmitKeyDataLength (raw_ostream &out,
@@ -459,7 +459,7 @@ namespace {
459
459
using offset_type = unsigned ;
460
460
461
461
hash_value_type ComputeHash (key_type_ref key) {
462
- return llvm::hash_value ( static_cast <uint32_t >(key) );
462
+ return static_cast <uint32_t >(key);
463
463
}
464
464
465
465
std::pair<unsigned , unsigned >
You can’t perform that action at this time.
0 commit comments