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 /tools/lli | |
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 'tools/lli')
-rw-r--r-- | tools/lli/lli.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 0823ff469de..f228a361945 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -606,8 +606,7 @@ int main(int argc, char **argv, char * const *envp) { // If the program doesn't explicitly call exit, we will need the Exit // function later on to make an explicit call, so get the function now. Constant *Exit = Mod->getOrInsertFunction("exit", Type::getVoidTy(Context), - Type::getInt32Ty(Context), - nullptr); + Type::getInt32Ty(Context)); // Run static constructors. if (!ForceInterpreter) { |