[llvm] r253570 - TargetParser.cpp: Fixup -- StringRef::startswith() is better here. NFC.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 07:42:53 PST 2015
Author: chapuni
Date: Thu Nov 19 09:42:52 2015
New Revision: 253570
URL: http://llvm.org/viewvc/llvm-project?rev=253570&view=rev
Log:
TargetParser.cpp: Fixup -- StringRef::startswith() is better here. NFC.
Modified:
llvm/trunk/lib/Support/TargetParser.cpp
Modified: llvm/trunk/lib/Support/TargetParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/TargetParser.cpp?rev=253570&r1=253569&r2=253570&view=diff
==============================================================================
--- llvm/trunk/lib/Support/TargetParser.cpp (original)
+++ llvm/trunk/lib/Support/TargetParser.cpp Thu Nov 19 09:42:52 2015
@@ -331,7 +331,7 @@ StringRef llvm::ARM::getArchExtName(unsi
}
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())
More information about the llvm-commits
mailing list