@@ -28,8 +28,8 @@ class OptPassGate {
2828
2929 // / IRDescription is a textual description of the IR unit the pass is running
3030 // / over.
31- virtual bool shouldRunPass (const StringRef PassName,
32- StringRef IRDescription) {
31+ virtual bool shouldRunPass (StringRef PassName,
32+ StringRef IRDescription) const {
3333 return true ;
3434 }
3535
@@ -62,8 +62,8 @@ class LLVM_ABI OptBisect : public OptPassGate {
6262 // / Most passes should not call this routine directly. Instead, it is called
6363 // / through helper routines provided by the base classes of the pass. For
6464 // / instance, function passes should call FunctionPass::skipFunction().
65- bool shouldRunPass (const StringRef PassName,
66- StringRef IRDescription) override ;
65+ bool shouldRunPass (StringRef PassName,
66+ StringRef IRDescription) const override ;
6767
6868 // / isEnabled() should return true before calling shouldRunPass().
6969 bool isEnabled () const override { return BisectLimit != Disabled; }
@@ -75,11 +75,11 @@ class LLVM_ABI OptBisect : public OptPassGate {
7575 LastBisectNum = 0 ;
7676 }
7777
78- static const int Disabled = std::numeric_limits<int >::max();
78+ static constexpr int Disabled = std::numeric_limits<int >::max();
7979
8080private:
8181 int BisectLimit = Disabled;
82- int LastBisectNum = 0 ;
82+ mutable int LastBisectNum = 0 ;
8383};
8484
8585// / Singleton instance of the OptBisect class, so multiple pass managers don't
0 commit comments