File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ class Requirement {
142
142
case RequirementKind::Conformance:
143
143
case RequirementKind::Superclass:
144
144
case RequirementKind::SameType:
145
- second = hash_value (requirement.getSecondType ());
145
+ second = hash_value (requirement.getSecondType (). getPointer () );
146
146
break ;
147
147
148
148
case RequirementKind::Layout:
Original file line number Diff line number Diff line change @@ -325,11 +325,6 @@ class Type {
325
325
// / Return the name of the type as a string, for use in diagnostics only.
326
326
std::string getString (const PrintOptions &PO = PrintOptions()) const ;
327
327
328
- friend llvm::hash_code hash_value (Type type) {
329
- using llvm::hash_value;
330
- return hash_value (type.getPointer ());
331
- }
332
-
333
328
// / Return the name of the type, adding parens in cases where
334
329
// / appending or prepending text to the result would cause that text
335
330
// / to be appended to only a portion of the returned type. For
@@ -502,6 +497,10 @@ class CanType : public Type {
502
497
bool operator ==(CanType T) const { return getPointer () == T.getPointer (); }
503
498
bool operator !=(CanType T) const { return !operator ==(T); }
504
499
500
+ friend llvm::hash_code hash_value (CanType T) {
501
+ return llvm::hash_value (T.getPointer ());
502
+ }
503
+
505
504
bool operator <(CanType T) const { return getPointer () < T.getPointer (); }
506
505
};
507
506
Original file line number Diff line number Diff line change @@ -206,13 +206,13 @@ struct TypeWitnessAndDecl {
206
206
}
207
207
208
208
friend llvm::hash_code hash_value (const TypeWitnessAndDecl &owner) {
209
- return llvm::hash_combine (owner.witnessType ,
209
+ return llvm::hash_combine (owner.witnessType . getPointer () ,
210
210
owner.witnessDecl );
211
211
}
212
212
213
213
friend bool operator ==(const TypeWitnessAndDecl &lhs,
214
214
const TypeWitnessAndDecl &rhs) {
215
- return lhs.witnessType -> isEqual ( rhs.witnessType ) &&
215
+ return lhs.witnessType . getPointer () == rhs.witnessType . getPointer ( ) &&
216
216
lhs.witnessDecl == rhs.witnessDecl ;
217
217
}
218
218
You can’t perform that action at this time.
0 commit comments