[clang] [Clang][attr] Add 'kcfi_salt' attribute (PR #141846)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 1 12:47:49 PDT 2025


================
@@ -3643,6 +3643,64 @@ make the function's CFI jump table canonical. See :ref:`the CFI documentation
   }];
 }
 
+def KCFISaltDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+Use ``__attribute__((kcfi_salt("<salt>")))`` on a function declaration, function
+definition, or typedef to help distinguish CFI hashes between functions with
+the same type signature.
----------------
bwendling wrote:

I added some of Sami's examples to the docs. Let me know what you think.

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


More information about the cfe-commits mailing list