[LLVMdev] c char translated to i8 signext
Ryan M. Lefever
lefever at crhc.uiuc.edu
Wed Apr 30 11:22:24 PDT 2008
Thanks for your response. When I attempt to get the parameter attribute
lists for the function and its call sites, the list is NULL. Is there
someone else I should be looking to get the parameter attributes?
Chris Lattner wrote:
> On Wed, 30 Apr 2008, Ryan M. Lefever wrote:
>> I have a c function that takes a char as a parameter. When it is
>> compiled to bytecode, it gets translated to i8 signext. Why is signext
>> getting added to the type? It doesn't get added if the parameter is an
>> int. Is there a way to alter the parameter in the c code so that it
>> simply gets translated to an i8, or is there a way in LLVM to modify the
>> parameter's type?
>
> This is an ABI requirement for your target. You can remove it from the
> llvm ir by removing the parameter attribute from the function and calls to
> it.
>
> -Chris
>
More information about the llvm-dev
mailing list