[llvm-dev] LLVM 7.0.1 Error no matching constructor for initialization of SmallVector

Bekket McClane via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 16 09:56:32 PST 2019


It would be great if you can attach your source code and complete error message.

But one of the possible reasons might be some API with var-args, Module::getOrInsertFunction for example(http://llvm.org/doxygen/classllvm_1_1Module.html#a9c362a6df0554c3d9355aadfa67a1914 <http://llvm.org/doxygen/classllvm_1_1Module.html#a9c362a6df0554c3d9355aadfa67a1914> ), do not use NULL to mark the last argument anymore. So SmallVector cannot deduct the type for NULL, which would be deducted as unsigned int instead of llvm::Type* as originally expected.

Best Regards,

> On Feb 16, 2019, at 9:44 AM, hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hello
> With LLVM 4.0 my code is being compiled correctly. but with LLVM 7.0.1 I am getting following error;
> llvm-7.0.1.src/include/llvm/IR/Module.h:356:43: error: 
>       no matching constructor for initialization of 'SmallVector<llvm::Type *,
>       sizeof...(ArgsTy)>'
>     SmallVector<Type*, sizeof...(ArgsTy)> ArgTys{Args...};
> What is the reason?
> Due to this I am unable to do my task with LLVM7.0.1. How to solve this?
> Please help.
> Thank You
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190216/b155865a/attachment.html>

More information about the llvm-dev mailing list