undefined symbol: _ZTIN4llvm10ModulePassE

I have a MdoulePass which compiles and runs fine with LLVM3.1. Then I wanted to upgrade to LLVM3.3, it compiles and links fine, but when you run it by “opt -load /path/to/.so”, it shows this message:

undefined symbol: _ZTIN4llvm10ModulePassE

which means undefined symbol: llvm::ModulePass after demangling.

Googled for a while and still no clue.

Anybody have an idea?


It turns out to be RTTI related. If I compile LLVM with RTTI, there is no undefined symbol: _ZTIN4llvm10ModulePassE message.