[LLVMdev] c char translated to i8 signext
Chris Lattner
sabre at nondot.org
Wed Apr 30 12:00:51 PDT 2008
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
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list