[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)
Daniil Kovalev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 17 08:01:14 PDT 2024
================
@@ -3041,3 +3046,20 @@ llvm::Value *CodeGenFunction::emitBoolVecConversion(llvm::Value *SrcVec,
return Builder.CreateShuffleVector(SrcVec, ShuffleMask, Name);
}
+
+void CodeGenFunction::EmitPointerAuthOperandBundle(
+ const CGPointerAuthInfo &PointerAuth,
+ SmallVectorImpl<llvm::OperandBundleDef> &Bundles) {
+ if (!PointerAuth.isSigned())
+ return;
+
+ auto Key = Builder.getInt32(PointerAuth.getKey());
+
+ llvm::Value *Discriminator = PointerAuth.getDiscriminator();
+ if (!Discriminator) {
----------------
kovdan01 wrote:
nit: omit braces for simple if statements https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/93906
More information about the llvm-branch-commits
mailing list