MSIL backend: external varargs signatures printing

Hi,

After discussion with Anton, I did the whole thing in a little bit different way (please see the attached patch). It again looks like reinvented wheel for LLVM experts, I suppose, but it works. What I want to achieve is to generate real (with all variadic arguments) call signature for each variadic and external function, without the “vararg” keyword and without the “…”, and of course just once for each such signature.
As Anton sugested, it would be probably the easiest to use CallSite() and construct FunctionType for each such signature, but the thing is that I must also take into account the sign extension of each parameter.
If anyone has an idea how to do it more LLVM-like, I’d be grateful for sharing that idea with me.

Anton, I hope I haven’t forgotten any spaces this time :wink:

Thanks for your help and patience.

Artur

ps: My discussion with Anton was in a wrong (concerning another patch) thread. Sorry for that.

varargs.patch (7.81 KB)