I am playing with this simple example https://github.com/eliben/llvm-clang-samples/blob/master/src_llvm/simple_module_pass.cpp.
I added a LoopInfo pass dependency:
// Create a pass manager and fill it with the passes we want to run.
When linking against the release version of LLVM library, it compiles, links, and runs fine.
But when linking against the debug version of LLVM library, it crashes on PM.add(new LoopInfoWrapperPass());
I am pretty sure I might be doing something stupid, but cannot see the problem.