I am trying to develop an llvm pass under my project directory. For that, I follow the info in http://llvm.org/docs/CMake.html#developing-llvm-pass-out-of-source. I create m
from http://www.jiang925.com/node/28
Undefined Symbol: _ZTIN4llvm12FunctionPassE There is an inconsistency between LLVM main build system and the cmake support for building out-of-source. The LLVM binaries are built without runtime type info "-fno-rtti". Therefore, the out-of-source passes have to be built the same way otherwise opt will complain that symbol "_ZTIN4llvm12FunctionPassE" is undefined.
To solve this problem, LLVM must be compile with RTTI enabled. Add "-DLLVM_REQUIRES_RTTI=1" to cmake, or add "REQUIRES_RTTI=1" to make.
So I added SET(CMAKE_CXX_FLAGS "-Wall -fno-rtti")
to CMakeLists.txt of my pass library and then it's working.