We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a9a78e commit 7ca4079Copy full SHA for 7ca4079
llvm/lib/TargetParser/ARMTargetParserCommon.cpp
@@ -82,9 +82,9 @@ StringRef ARM::getCanonicalArchName(StringRef Arch) {
82
// Ex. "armebv7", move past the "eb".
83
if (offset != StringRef::npos && A.substr(offset, 2) == "eb")
84
offset += 2;
85
- // Or, if it ends with eb ("armv7eb"), chop it off.
86
- else if (A.ends_with("eb"))
87
- A = A.substr(0, A.size() - 2);
+ else
+ // Or, if it ends with eb ("armv7eb"), chop it off.
+ A.consume_back("eb");
88
// Trim the head
89
if (offset != StringRef::npos)
90
A = A.substr(offset);
0 commit comments