[LLVMdev] Patch: MSIL backend global pointers initialization

Artur Pietrek pietreka at gmail.com
Wed Apr 8 03:25:23 PDT 2009


Hi Anton,

>
> > OK, I just need the same signature for both of those instructions.
> Both are callinsts of same function, isn't that enough? Since it's a
> variadic function there is also a bitcast to proper type. So, looking
> for type of callee (not result, but function type!) you'll obtain the
> real "signature" of callee and if you'll strip all pointer cast you'll
> obtain the "declaration" (=variadic) type of the callee. This should
> be enough for almost all purposes. You should not try to invent some
> custom "comparison schemes", almost surely in such situation you're
> reinventing the wheel :)
>
> So I do this:

if (CallInst *cinst = cast<CallInst>(instr)) {
  const FunctionType *FTy = cinst->getCalledFunction()->getFunctionType();
}

What I get "i32 (i8*, ...)"
How can I get something like "i32 (i8*, i32)"?

Thanks for your help.
Regards,
Artur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090408/f50cc21b/attachment.html>


More information about the llvm-dev mailing list