[llvm-branch-commits] [clang] [llvm] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

Akira Hatanaka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 18 21:48:41 PDT 2024


================
@@ -61,3 +79,28 @@ CodeGen::getConstantSignedPointer(CodeGenModule &CGM, llvm::Constant *Pointer,
   return CGM.getConstantSignedPointer(Pointer, Key, StorageAddress,
                                       OtherDiscriminator);
 }
+
+/// If applicable, sign a given constant function pointer with the ABI rules for
+/// functionType.
+llvm::Constant *CodeGenModule::getFunctionPointer(llvm::Constant *Pointer,
+                                                  QualType FunctionType,
+                                                  GlobalDecl GD) {
----------------
ahatanak wrote:

No, it isn't. I've removed it. It will be needed when we add support for function-type based signing later.

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


More information about the llvm-branch-commits mailing list