How to implement a disable-pass option

So, the PassInstrumentation idea didn’t work out?

But if you want to do this in opt, rather than clang, that’s much simpler. opt (see llvm/tools/opt/opt.cpp) already lets you do the inverse, specify a list of passes that you do want to run. If that doesn’t meet your needs, then surely you can look at how it handles the parsing of the pass list (look for PassPipeline) as a model for what you do want.