Developing passes out of tree causes so many random headaches that it's not really worth doing it. Just spend 30 mins and build LLVM from source.
Because :
> It works perfectly with your system's LLVM installation
It works perfectly with *your* system's LLVM installation.