mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Re-Core Fingerprint
Switch from a string core to a 128-bit integral core. This should make Fingerprints much cheaper to copy around and sets us up for a future where we can provide alternative implementations of the ambient hashing algorithm. rdar://72313506
This commit is contained in:
@@ -600,9 +600,9 @@ public:
|
||||
static data_type ReadData(internal_key_type key, const uint8_t *data,
|
||||
unsigned length) {
|
||||
using namespace llvm::support;
|
||||
auto str = std::string{reinterpret_cast<const char *>(data),
|
||||
Fingerprint::DIGEST_LENGTH};
|
||||
return Fingerprint{str};
|
||||
auto str = llvm::StringRef{reinterpret_cast<const char *>(data),
|
||||
Fingerprint::DIGEST_LENGTH};
|
||||
return Fingerprint::fromString(str);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user