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 | 5fd75fb72e0eb04bf590765fc70f27a444993e74 (patch) | |
| tree | 84129b3eeea29bf385a524a5f3775c7323612619 /llvm/lib/Target/Mips | |
| parent | 06faa9bf329e1386f9fc8a5dee55be6027d1d6d0 (diff) | |
| download | bcm5719-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/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/Mips16HardFloat.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/Mips16HardFloat.cpp b/llvm/lib/Target/Mips/Mips16HardFloat.cpp index 53a5d2f0ac1..a71b161b24c 100644 --- a/llvm/lib/Target/Mips/Mips16HardFloat.cpp +++ b/llvm/lib/Target/Mips/Mips16HardFloat.cpp @@ -420,7 +420,7 @@ static bool fixupFPReturnAndCall(Function &F, Module *M, Attribute::ReadNone); A = A.addAttribute(C, AttributeList::FunctionIndex, Attribute::NoInline); - Value *F = (M->getOrInsertFunction(Name, A, MyVoid, T, nullptr)); + Value *F = (M->getOrInsertFunction(Name, A, MyVoid, T)); CallInst::Create(F, Params, "", &I); } else if (const CallInst *CI = dyn_cast<CallInst>(&I)) { FunctionType *FT = CI->getFunctionType(); |

