[LLVMdev] Why function pointer is different from other data type?

SHEN Hao hao.shen at imag.fr
Mon Apr 12 09:31:14 PDT 2010


OK. I understand. Thanks a lot for all of you.

Best regards,
Hao

On Mon, Apr 12, 2010 at 6:20 PM, Victor Zverovich
<victor.zverovich at googlemail.com> wrote:
> "float (i32)* (float (i32)*)*" is not a return type.
> According to the description of the 'call' instruction in LLVM Assembly
> Language Reference Manual (http://llvm.org/docs/LangRef.html#i_call) this
> is a signature of the pointer to function value being invoked (which
> includes the return type). In your case the full signature is printed
> because get_ptr returns a pointer to function (read item 5 in the Arguments
> section of the 'call' Instruction section).
> Victor
>
> On 12 April 2010 16:58, SHEN Hao <hao.shen at imag.fr> wrote:
>>
>> I'm sorry that I should remove the comment.
>>
>> In fact my question is about the "float (i32)* (float (i32)*)*", why
>> we use this kind of return type instead of just "float (i32)*".
>>
>> Thanks a lot.
>> Hao
>>
>> On Mon, Apr 12, 2010 at 5:42 PM, Duncan Sands <baldrick at free.fr> wrote:
>> > Hi Hao Shen,
>> >
>> >> %4 = call float (i32)* (float (i32)*)* @get_ptr(float (i32)* @a1)
>> >> nounwind ;<float (i32)*>  [#uses=1]
>> >>                ~~~~~~~~~~~~~~~~~~~~  VERY STRANGE RETURN TYPE !!!
>> >
>> > this is a comment, and only exists to help the human reader.  Comments
>> > start with a semi-colon (;).  You can remove them if you like.
>> >
>> > Ciao,
>> >
>> > Duncan.
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>>
>>
>>
>> --
>> Hao Shen
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>



-- 
Hao Shen




More information about the llvm-dev mailing list