Change the PassManager from a reference to a pointer.