[LLVMdev] Re: C back-end for llvmg++

John T. Criswell criswell at uiuc.edu
Sun Nov 21 06:56:56 PST 2004


Vikram Adve wrote:

> On Nov 19, 2004, at 9:25 PM, Mohd-Hanafiah Abdullah wrote:
>
>     Dear Dr Vikram:
>
>     I need to know how to invoke llvmg++ so that it generates C code.
>
>
> Here's how you can do a single file (i.e., an unlinked executable):
>
> llvmg++ -c infile.cpp -o - | llc -march=c -o infile.cbe.c


I believe that llc only accepts LLVM bytecode, while llvmg++ only 
generates LLVM assembly code (i.e. human readable LLVM code that must be 
assembled with llvm-as or gccas).

If the above command line does not work, please try the following:

llvmg++ -c infile.cpp -o - | llvm-as | llc -march=c -o infile.cbe.c

-- John T.

>
> Reid might be able to tell you how to do it with a single command 
> using the llvmc tool.
>
> In future, please send your questions to llvmdev at cs.uiuc.edu (and add 
> yourself to that list if you're not on it, because all replies go to 
> the list by default).
>
>
>     Thanks and kind regards
>
>     Napi
>
>
>
> Good luck,
>
> --Vikram
> http://www.cs.uiuc.edu/~vadve
> http://llvm.cs.uiuc.edu/
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>LLVM Developers mailing list
>LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>  
>




More information about the llvm-dev mailing list