Getting CallGraph SCCs

Is there a way in LLVM , using which I can get Call graph SCCs in reverse post order in a FunctionPass object?

-Balpreet

Yes, in your Pass, just add require the CallGraph interface. Then do a rpo iteration on the callgraph node objects.

-Chris