[LLVMdev] C++ to C?
Török Edwin
edwintorok at gmail.com
Sat Oct 11 00:49:10 PDT 2008
On 2008-10-10 21:29, Michael wrote:
> What command and options should be used to convert C++ to C?
>
This works usually:
llvm-g++ -O2 -c x.cpp -emit-llvm -o - | llc -march=c
Or:
llvm-g++ -O2 -c x.cpp -emit-llvm -o x.bc
llc x.bc -march=c -o x.cbe.c
However the resulting C file is not meant to be human-readable (or
understandable).
What do you need the C++ -> C conversion for?
Best regards,
--Edwin
More information about the llvm-dev
mailing list