mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Add generic support for hashing StringRef objects using the new hashing library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/APInt.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/edit_distance.h"
|
||||
#include <bitset>
|
||||
|
||||
@ -447,3 +448,9 @@ bool StringRef::getAsInteger(unsigned Radix, APInt &Result) const {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Implementation of StringRef hashing.
|
||||
hash_code llvm::hash_value(StringRef S) {
|
||||
return hash_combine_range(S.begin(), S.end());
|
||||
}
|
||||
|
Reference in New Issue
Block a user