Using a FunctionPass inside a CallGraphSCCPass


I am writing a CallGraphSCCPass that uses LoopInfo which is a FunctionPass.
However, doing so results in the following error.


Is there any guiding principle that has been used to structure the Pass
Manager infrastructure related header files. I ask because I see a number of
pass managers documented in PassManagers.h but most, except FPPassManager
and a couple others, reside in PassManagers.cpp.

I want to move FunctionPassManagerImpl into PassManagers.h so that it can be
used inside CGPassManager. I want to be able to run function passes on the
fly in a CallGraphSCCPass and I think FunctionPassManagerImpl is the only
way to do it. Or am I wrong in this conclusion ?

Qualcomm Innovation Center, Inc is a member of the Code Aurora Forum.