summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-06-01 23:45:25 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-06-01 23:45:25 +0000
commit3a4ce89f185a14f9dc8d439fd9d5cb7912ddcfc0 (patch)
treea87220708c383990801f5d9746fb99a89443edf9 /llvm/lib/Support
parent5c2589a50b9fb946482fc7cdfe7556920d3146cc (diff)
downloadbcm5719-llvm-3a4ce89f185a14f9dc8d439fd9d5cb7912ddcfc0.tar.gz
bcm5719-llvm-3a4ce89f185a14f9dc8d439fd9d5cb7912ddcfc0.zip
[Support] Simplify Triple::getOSVersion
Those who are interested in the Android version can use getEnvironmentVersion instead of getOSVersion. llvm-svn: 238798
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Triple.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 6c6b87ea5fb..4bfcd76ab87 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -815,21 +815,13 @@ void Triple::getEnvironmentVersion(unsigned &Major, unsigned &Minor,
StringRef EnvironmentTypeName = getEnvironmentTypeName(getEnvironment());
if (EnvironmentName.startswith(EnvironmentTypeName))
EnvironmentName = EnvironmentName.substr(EnvironmentTypeName.size());
+
parseVersionFromName(EnvironmentName, Major, Minor, Micro);
}
void Triple::getOSVersion(unsigned &Major, unsigned &Minor,
unsigned &Micro) const {
StringRef OSName = getOSName();
-
- // For Android, we care about the Android version rather than the Linux
- // version.
- if (getEnvironment() == Android) {
- OSName = getEnvironmentName().substr(strlen("android"));
- if (OSName.startswith("eabi"))
- OSName = OSName.substr(strlen("eabi"));
- }
-
// Assume that the OS portion of the triple starts with the canonical name.
StringRef OSTypeName = getOSTypeName(getOS());
if (OSName.startswith(OSTypeName))
OpenPOWER on IntegriCloud