[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

Scott Constable via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 23 12:55:09 PST 2024


================
@@ -208,10 +209,34 @@ void llvm::setKCFIType(Module &M, Function &F, StringRef MangledType) {
   std::string Type = MangledType.str();
   if (M.getModuleFlag("cfi-normalize-integers"))
     Type += ".normalized";
+
+  uint32_t OutHash = static_cast<uint32_t>(llvm::xxHash64(Type));
+  auto T = Triple(Twine(M.getTargetTriple()));
----------------
scottconstable wrote:

Thank you for the suggestion! This does look tidier than what I had written. I updated the PR.

https://github.com/llvm/llvm-project/pull/117121


More information about the llvm-commits mailing list