[LLVMdev] "long long" type in C backend

Chris Lattner clattner at apple.com
Mon Aug 11 09:18:45 PDT 2008


On Aug 11, 2008, at 6:09 AM, Valen wrote:

> Hi,
> Im trying to generate C source from C++ source file,
> using C backend.
>
> llvm-g++          -O3 -emit-llvm valen.cpp -c -o valen.bc
> llc               -march=c valen.bc -f -o valen.c
>
>
> But C backend generate a lot of operation with "long long" type.
> My C compiler does not support "long long" type.
> Is there any option to disable generate "long long" ?

The C backend generates long long for 64-bit integer types.  If you're  
C compiler doesn't support a 64-bit integer type, you'll have  
problems.  If it does, but spells it differently, you could hack the  
CBE to produce the right name.

-Chris



More information about the llvm-dev mailing list