MC: Make MCSubtargetInfo::isCPUStringValid() const, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 8 Jul 2015 17:41:53 +0000 (17:41 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 8 Jul 2015 17:41:53 +0000 (17:41 +0000)
This method doesn't modify any members, so it should be const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241694 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCSubtargetInfo.h

index b8ad02fbe696880c2d0333bbea90db962cacc26f..0dbb93de56cad0defcd316f3a31dd6d89d762b4d 100644 (file)
@@ -151,7 +151,7 @@ public:
   void initInstrItins(InstrItineraryData &InstrItins) const;
 
   /// Check whether the CPU string is valid.
-  bool isCPUStringValid(StringRef CPU) {
+  bool isCPUStringValid(StringRef CPU) const {
     auto Found = std::find_if(ProcDesc.begin(), ProcDesc.end(),
                               [=](const SubtargetFeatureKV &KV) {
                                 return CPU == KV.Key;