diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2017-04-11 08:36:52 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2017-04-11 08:36:52 +0000 |
commit | ec124b3a6f9f60313f604cdf3e199f6540311d46 (patch) | |
tree | a830dac94e6dde071dda081f9d68d97548697fb4 /lib/CodeGen/TargetLoweringBase.cpp | |
parent | 262869e2bf83bc104a77edf733241fb4f385573a (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetLoweringBase.cpp b/lib/CodeGen/TargetLoweringBase.cpp index fc147633966..27630a3055c 100644 --- a/lib/CodeGen/TargetLoweringBase.cpp +++ b/lib/CodeGen/TargetLoweringBase.cpp @@ -1818,7 +1818,7 @@ Value *TargetLoweringBase::getSafeStackPointerLocation(IRBuilder<> &IRB) const { Module *M = IRB.GetInsertBlock()->getParent()->getParent(); Type *StackPtrTy = Type::getInt8PtrTy(M->getContext()); Value *Fn = M->getOrInsertFunction("__safestack_pointer_address", - StackPtrTy->getPointerTo(0), nullptr); + StackPtrTy->getPointerTo(0)); return IRB.CreateCall(Fn); } |