summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@quarkslab.com>2017-04-11 08:36:52 +0000
committerSerge Guelton <sguelton@quarkslab.com>2017-04-11 08:36:52 +0000
commit5fd75fb72e0eb04bf590765fc70f27a444993e74 (patch)
tree84129b3eeea29bf385a524a5f3775c7323612619 /llvm/lib/CodeGen/SjLjEHPrepare.cpp
parent06faa9bf329e1386f9fc8a5dee55be6027d1d6d0 (diff)
downloadbcm5719-llvm-5fd75fb72e0eb04bf590765fc70f27a444993e74.tar.gz
bcm5719-llvm-5fd75fb72e0eb04bf590765fc70f27a444993e74.zip
Turn some C-style vararg into variadic templates
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. llvm-svn: 299925
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/SjLjEHPrepare.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index 9c8dc130de2..ab578df4069 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -482,10 +482,10 @@ bool SjLjEHPrepare::runOnFunction(Function &F) {
Module &M = *F.getParent();
RegisterFn = M.getOrInsertFunction(
"_Unwind_SjLj_Register", Type::getVoidTy(M.getContext()),
- PointerType::getUnqual(FunctionContextTy), nullptr);
+ PointerType::getUnqual(FunctionContextTy));
UnregisterFn = M.getOrInsertFunction(
"_Unwind_SjLj_Unregister", Type::getVoidTy(M.getContext()),
- PointerType::getUnqual(FunctionContextTy), nullptr);
+ PointerType::getUnqual(FunctionContextTy));
FrameAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::frameaddress);
StackAddrFn = Intrinsic::getDeclaration(&M, Intrinsic::stacksave);
StackRestoreFn = Intrinsic::getDeclaration(&M, Intrinsic::stackrestore);
OpenPOWER on IntegriCloud