[llvm] r241694 - MC: Make MCSubtargetInfo::isCPUStringValid() const, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Jul 8 10:41:53 PDT 2015
Author: dexonsmith
Date: Wed Jul 8 12:41:53 2015
New Revision: 241694
URL: http://llvm.org/viewvc/llvm-project?rev=241694&view=rev
Log:
MC: Make MCSubtargetInfo::isCPUStringValid() const, NFC
This method doesn't modify any members, so it should be const.
Modified:
llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
Modified: llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSubtargetInfo.h?rev=241694&r1=241693&r2=241694&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSubtargetInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCSubtargetInfo.h Wed Jul 8 12:41:53 2015
@@ -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;
More information about the llvm-commits
mailing list