diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp index e93502187b54..b9971c25af71 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Triple.cpp @@ -1206,11 +1206,14 @@ static VersionTuple parseVersionFromName(StringRef Name) { } VersionTuple Triple::getEnvironmentVersion() const { + return parseVersionFromName(getEnvironmentVersionString()); +} + +StringRef Triple::getEnvironmentVersionString() const { StringRef EnvironmentName = getEnvironmentName(); StringRef EnvironmentTypeName = getEnvironmentTypeName(getEnvironment()); EnvironmentName.consume_front(EnvironmentTypeName); - - return parseVersionFromName(EnvironmentName); + return EnvironmentName; } VersionTuple Triple::getOSVersion() const { |
