diff options
author | Fangrui Song <i@maskray.me> | 2023-07-19 15:20:50 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-07-19 15:20:50 -0700 |
commit | aa972f607c55cdbab3b9182aacb3ed6a5d9e73e1 (patch) | |
tree | 6a8d4025b05d99981dd7f0f93c540b9ba1a85c52 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | a6302b6934b349fff122eeb6c4b39eff580c4b1b (diff) | |
download | llvm-aa972f607c55cdbab3b9182aacb3ed6a5d9e73e1.zip llvm-aa972f607c55cdbab3b9182aacb3ed6a5d9e73e1.tar.gz llvm-aa972f607c55cdbab3b9182aacb3ed6a5d9e73e1.tar.bz2 |
-fsanitize=function,MicrosoftMangle: Switch to xxh3_64bits
Following recent changes switching from xxh64 to xxh32 for better
hashing performance (e.g., D154813). These particular instances likely
have negligible time, but this change moves us toward removing xxHash64.
The type hash for -fsanitize=function will change, following a recent
change D148785 (not in any release yet) to the type hash scheme, though
sanitizers don't sign up for cross-version compatibility anyway.
The MicrosoftMangle instance is for internal symbols that need no
compatibility guarantee, as emphasized by the comment.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index b8d3937..fab70b6 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -577,8 +577,8 @@ CodeGenFunction::getUBSanFunctionTypeHash(QualType Ty) const { std::string Mangled; llvm::raw_string_ostream Out(Mangled); CGM.getCXXABI().getMangleContext().mangleTypeName(Ty, Out, false); - return llvm::ConstantInt::get(CGM.Int32Ty, - static_cast<uint32_t>(llvm::xxHash64(Mangled))); + return llvm::ConstantInt::get( + CGM.Int32Ty, static_cast<uint32_t>(llvm::xxh3_64bits(Mangled))); } void CodeGenFunction::EmitKernelMetadata(const FunctionDecl *FD, |