[llvm] [LLVM] Make more use of IRBuilder::CreateIntrinsic. NFC. (PR #112546)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 07:40:14 PDT 2024


================
@@ -541,8 +540,7 @@ static bool CreatePrologue(Function *F, Module *M, Instruction *CheckLoc,
   AI = B.CreateAlloca(PtrTy, nullptr, "StackGuardSlot");
 
   Value *GuardSlot = getStackGuard(TLI, M, B, &SupportsSelectionDAGSP);
-  B.CreateCall(Intrinsic::getOrInsertDeclaration(M, Intrinsic::stackprotector),
-               {GuardSlot, AI});
+  B.CreateIntrinsic(Intrinsic::stackprotector, {}, {GuardSlot, AI});
----------------
jayfoad wrote:

Yeah, there could certainly be more useful overloads, and maybe more default arguments. But I didn't really want to do that in this patch.

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


More information about the llvm-commits mailing list