TargetParser.cpp: Fixup -- StringRef::startswith() is better here. NFC.
[oota-llvm.git] / lib / Support / TargetParser.cpp
index 371ae35..75e4b4b 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())