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. 回答1: The LLVM C++ backend has to be enabled during configuration when building LLVM. It's enabled by default in the