[LLVMdev] LLVM demo page

Óscar Fuentes ofv at wanadoo.es
Thu Feb 7 02:09:10 PST 2013


Blind Faith <person.of.book at gmail.com> writes:

> I used the LLVM demo page http://llvm.org/demo/ to generate C++ code for
> generating LLVM IR code. But that page is now disabled. Is there any tool
> or other site which does what I'm trying to do, that is I give "C/C++ code"
> as input and I get the "C++ code for generating the equivalent LLVM IR" as
> output.

You can use clang++ and llc for that:

$ clang++ -c -emit-llvm foo.cpp -o foo.ll
$ llc -march=cpp -o foo.ll.cpp foo.ll

(Note: the CppBackend is not enabled by default when you build with
CMake on Windows.)




More information about the llvm-dev mailing list