================ @@ -82,6 +83,44 @@ class LLVM_ABI OptBisect : public OptPassGate { int LastBisectNum = 0; }; +/// This class implements a mechanism to disable passes and individual +/// optimizations at compile time based on a command line option +/// (-opt-disable) in order to study how single transformations, or +/// combinations thereof, affect the IR. +class LLVM_ABI OptDisable : public OptPassGate { +public: + /// Default constructor. Initializes the state to empty set. The disabling + /// will be enabled by the cl::opt call-back when the command line option + /// is processed. + /// Clients should not instantiate this class directly. All access should go + /// through LLVMContext. + OptDisable() = default; + + virtual ~OptDisable() = default; ---------------- mtrofin wrote:
you don't need this. Also, if you did: `~OptDisable() override` https://github.com/llvm/llvm-project/pull/145059 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits