[LLVMdev] C++ to C?

Duncan Sands baldrick at free.fr
Sat Oct 11 00:49:19 PDT 2008


On Friday 10 October 2008 20:29:49 Michael wrote:
> What command and options should be used to convert C++ to C?

Try this:

llvm-gcc -c -O3 -emit-llvm file.cpp -o - | llc -march=c -o -

It should spray C code to standard out.

Ciao,

Duncan.



More information about the llvm-dev mailing list