Currently there is no way to lazy-load an in-memory IR module without first writing it to disk. This patch just exposes the existing implementation of getLazyIRModule.
This is effectively a revert of rL212364; I don't have all of the context for the original change, but I don't see why this function can't be exposed now, especially with the stronger type signature it currently has.