diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2017-04-06 20:09:31 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2017-04-06 20:09:31 +0000 |
commit | 579540a8f7967fdbc8b0bf7cd214a6b12a98a362 (patch) | |
tree | 09f39a11e4a7fde5de6cb576bd373684b4870ad7 /llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | |
parent | 0680968ff3e4971a870932ef0c9ff6f793bdb289 (diff) | |
download | bcm5719-llvm-579540a8f7967fdbc8b0bf7cd214a6b12a98a362.tar.gz bcm5719-llvm-579540a8f7967fdbc8b0bf7cd214a6b12a98a362.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.
Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>
Differential Revision: https://reviews.llvm.org/D31070
llvm-svn: 299699
Diffstat (limited to 'llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 2579528f54d..3ac542b6593 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -1220,8 +1220,8 @@ void DevirtModule::importResolution(VTableSlot Slot, VTableSlotInfo &SlotInfo) { if (Res.TheKind == WholeProgramDevirtResolution::SingleImpl) { // The type of the function in the declaration is irrelevant because every // call site will cast it to the correct type. - auto *SingleImpl = M.getOrInsertFunction( - Res.SingleImplName, Type::getVoidTy(M.getContext()), nullptr); + auto *SingleImpl = M.getOrInsertFunction(Res.SingleImplName, + Type::getVoidTy(M.getContext())); // This is the import phase so we should not be exporting anything. bool IsExported = false; |