[cfe-dev] Native llvm integer types in clang
Chris Lattner
clattner at apple.com
Mon Feb 1 10:16:45 PST 2010
On Feb 1, 2010, at 9:35 AM, Jochen Wilhelmy wrote:
> Hi!
>
> is there a way to access the native llvm fixed width types in clang?
>
> there is of course stdint.h which maps e.g.int32_t to int if int
> has 32 bit. But is there a way to access the native types
> like i32? perhaps via __i32 or __int(32) or whatever,
> ranging from i1 to i256 ;-)
> This also would simplify stdint.h.
>
> But I guess this makes internal problens e.g. in the
> name mangling.
Many CPUs support many different integer types, for example x86-64 supports i8, i16, i32, i64, i128.
Your best bet is to use the int_fast*_t typedefs from <stdint.h>
-Chris
More information about the cfe-dev
mailing list