aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp
index d475650c2d18..e93502187b54 100644
--- a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp
+++ b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp
@@ -1208,8 +1208,7 @@ static VersionTuple parseVersionFromName(StringRef Name) {
VersionTuple Triple::getEnvironmentVersion() const {
StringRef EnvironmentName = getEnvironmentName();
StringRef EnvironmentTypeName = getEnvironmentTypeName(getEnvironment());
- if (EnvironmentName.starts_with(EnvironmentTypeName))
- EnvironmentName = EnvironmentName.substr(EnvironmentTypeName.size());
+ EnvironmentName.consume_front(EnvironmentTypeName);
return parseVersionFromName(EnvironmentName);
}