mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Module::getOrInsertFunction is using C-style vararg instead of variadic templates.
From a user prospective, it forces the use of an annoying nullptr to mark the end of the vararg, and there's not type checking on the arguments. The variadic template is an obvious solution to both issues. Differential Revision: https://reviews.llvm.org/D31070 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -484,13 +484,13 @@ BasicBlock *StackProtector::CreateFailBB() {
|
||||
Constant *StackChkFail =
|
||||
M->getOrInsertFunction("__stack_smash_handler",
|
||||
Type::getVoidTy(Context),
|
||||
Type::getInt8PtrTy(Context), nullptr);
|
||||
Type::getInt8PtrTy(Context));
|
||||
|
||||
B.CreateCall(StackChkFail, B.CreateGlobalStringPtr(F->getName(), "SSH"));
|
||||
} else {
|
||||
Constant *StackChkFail =
|
||||
M->getOrInsertFunction("__stack_chk_fail", Type::getVoidTy(Context),
|
||||
nullptr);
|
||||
M->getOrInsertFunction("__stack_chk_fail", Type::getVoidTy(Context));
|
||||
|
||||
B.CreateCall(StackChkFail, {});
|
||||
}
|
||||
B.CreateUnreachable();
|
||||
|
||||
Reference in New Issue
Block a user