[LLVMdev] "long long" type in C backend

Chris Lattner clattner at apple.com
Mon Aug 11 13:45:55 PDT 2008


On Aug 11, 2008, at 1:40 PM, Jonathan S. Shapiro wrote:

> On Mon, 2008-08-11 at 13:29 -0700, Chris Lattner wrote:
>> The CBE output can't #include standard headers, the macros and types
>> that are defined in the headers will conflict.
>
> Is that true for the freestanding header files?

Yes.  The only exceptions to the rule have been alloca.h, setjmp.h and  
stdarg.h, and even those have been a huge pain and we avoid them on  
platforms where we can.

One example problem is that llvm doesn't preserve signedness of types,  
so you end up with a header defining:

void foo(int);

and the CBE emits a prototype of:

void foo(unsigned);

which leads to compilation failures.

-Chris



More information about the llvm-dev mailing list