There are some helpers in the Lint analysis pass that will setup
a pass manager and then run the Lint pass on a given Function/Module.
Those have been using the LegacyPassManager, but as a small step
towards removing the deprecated legacy pass manager this patch is
changing those helpers into using the new pass manager instead.
No idea if anyone is really is using those helpers. Maybe an
alternative had been to just remove them. There is at least no unit
tests or similar that verifies that they work, so I validated this
patch by using a hacked opt binary that called those functions
before running the normal pipeline.
I think this is how one is supposed to do it. But it gets a bit cluttery to setup all these managers everywhere.
Do you think it would be better to have some helper to setup a PassBuilder with default managers/analyses/proxies? (I don't think there exist such a helper today, but as some future improvement)