Generate LLVM C++ API code as backend
The Online LLVM demo page had an option to generate LLVM C++ API code as backend from a source code. However, that demo page is now disabled. I was wondering how we can do it ourselves using the available LLVM tools. I tried the following clang++ -c -emit-llvm input.cpp -o input.ll llc -march=cpp -o input.ll.cpp input.ll which gives the following error llc: error: invalid target 'cpp'. I am using LLVM/Clang version 3.2. Eli Bendersky The LLVM C++ backend has to be enabled during configuration when building LLVM. It's enabled by default in the configure (autotools) build, but not in the CMake