TargetParser.cpp: Fixup -- StringRef::startswith() is better here. NFC.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 19 Nov 2015 15:42:52 +0000 (15:42 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 19 Nov 2015 15:42:52 +0000 (15:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253570 91177308-0d34-0410-b5e6-96231b3b80d8

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) {
 }
 
 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())
     StringRef ArchExtBase(ArchExt.substr(2));
     for (const auto AE : ARCHExtNames) {
       if (AE.NegFeature && ArchExtBase == AE.getName())