modulepass requiring a functionpass

I have a ModulePass, which we'll call MP, that generates a dependency graph for an entire program. I want MP to require the UnifyFunctionExitNodes pass, which is a FunctionPass. Since its not possible to make a ModulePass depend on a FunctionPass, is my only choice to make MP a FunctionPass in which the runOnFunction() routine does nothing, and the doFinalization routine does all the work that the runOnModule() pass did when MP was a ModulePass?

Regards,
Ryan

Yes. Alternatively, you could arrange for the unifyfunctionexitnodes pass to always be run before yours through other ways: i.e. always pass the option to opt or something.

-Chris