Run the ObjCARCContractPass during LTO. The legacy LTO backend (under
LTO/ThinLTOCodeGenerator.cpp) already does this; this diff just adds that
behavior to the new LTO backend. Without that pass, the objc.clang.arc.use
intrinsic will get passed to the instruction selector, which doesn't know how to
handle it.
In order to test both the new and old pass managers, I've also added support for
the --[no-]lto-legacy-pass-manager flags.
P.S. Not sure if the ordering of the pass within the pipeline matters...
I initially tried making this a vector of Pass *, but it appears that creating the ObjCContractPass too early results in an error later:
Using this hook to delay initialization seems to work, though I'm not sure if it's the right solution.