aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-14 12:45:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-14 12:45:33 +0000
commit9768b0ae7328d2151b85c612e6686553206d2ab1 (patch)
treece11472d153e29881f955ceaf7b0c52ec24c3e96 /llvm/lib/Support/Triple.cpp
parentbe7aa544f00eefb08ed442d6f967203c1369f95a (diff)
downloadllvm-9768b0ae7328d2151b85c612e6686553206d2ab1.zip
llvm-9768b0ae7328d2151b85c612e6686553206d2ab1.tar.gz
llvm-9768b0ae7328d2151b85c612e6686553206d2ab1.tar.bz2
Add a Musl environment to the triple.
It will be used in clang. Patch by Lei Zhang. llvm-svn: 272660
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 1967fac..c792fcb 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -205,6 +205,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case EABI: return "eabi";
case EABIHF: return "eabihf";
case Android: return "android";
+ case Musl: return "musl";
case MSVC: return "msvc";
case Itanium: return "itanium";
case Cygnus: return "cygnus";
@@ -464,6 +465,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
.StartsWith("code16", Triple::CODE16)
.StartsWith("gnu", Triple::GNU)
.StartsWith("android", Triple::Android)
+ .StartsWith("musl", Triple::Musl)
.StartsWith("msvc", Triple::MSVC)
.StartsWith("itanium", Triple::Itanium)
.StartsWith("cygnus", Triple::Cygnus)