Problem linking class to a pass in a loadable module

Check out the bug report at http://llvm.org/bugs/show_bug.cgi?id=13144 and try adding KEEP_SYMBOLS := 1 to tools/opt/Makefile like the OP suggests.

Good luck.