problem with Value->dump()


I am building a pass. The pass compiled well. But when I test it, I get a linking error.
Here, what I am doing:

clang -g3 -shared -fno-rtti -fPIC -o mypass.cpp //mypass has Value->dump();
opt -load -myppass test.ll

I get:

opt: symbol lookup error: undefined symbol: _ZNK4llvm5Value4dumpEv

unable to link/find llvm/Value/dump

dump functions are only available if LLVM was built with !NDEBUG or with LLVM_ENABLE_DUMP (so usually a debug build, maybe an Asserts build, not generally in release builds) - so you might need to find opt built with this option or build it yourself with this option