From 59a2d7b9093617aff6b6f147ba267bc788aa08b7 Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Tue, 11 Apr 2017 15:01:18 +0000 Subject: 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. Differential Revision: https://reviews.llvm.org/D31070 llvm-svn: 299949 --- llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp') diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 2579528f54d..cb7d487b68b 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -1221,7 +1221,7 @@ void DevirtModule::importResolution(VTableSlot Slot, VTableSlotInfo &SlotInfo) { // 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); + Res.SingleImplName, Type::getVoidTy(M.getContext())); // This is the import phase so we should not be exporting anything. bool IsExported = false; -- cgit v1.2.3