TargetParser.cpp: Fixup -- StringRef::startswith() is better here. NFC.
[oota-llvm.git] / lib / Support / TargetParser.cpp
index 371ae35c54a39a0fa97c107eaf216bdd3a394928..75e4b4bed56fff1c681be2c7d41438f369d262e3 100644 (file)
@@ -331,7 +331,7 @@ StringRef llvm::ARM::getArchExtName(unsigned ArchExtKind) {
 }
 
 const char *llvm::ARM::getArchExtFeature(StringRef ArchExt) {
-  if (ArchExt.substr(0, 2) == "no") {
+  if (ArchExt.startswith("no")) {
     StringRef ArchExtBase(ArchExt.substr(2));
     for (const auto AE : ARCHExtNames) {
       if (AE.NegFeature && ArchExtBase == AE.getName())