The LTO pass currently only offers assembly or object file outputs. We
can obtain the final LLVM output using the hooks, but is inconvenient
and disrupts the flow of the compilation. This patch proposes adding a
convenience function to perform this if the user requires it. We would
like this for the desire to retain the post-optimized LTO bitcode for
LLVM offloading compileations, such as JIT, builtin linking, or
performing a relocatable link on LLVM-IR.
Depends on D152442