summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-24 21:14:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-24 21:14:33 +0000
commitab8ffadc13b59c92cf8f4983c9ce1c4656968b08 (patch)
tree97c2ad37be17816b56415c7f45a10274f539a94d /include
parent5b01931d4cfe1a189524043917fc23089df8af8a (diff)
Add support for musl-libc on ARM Linux.
Patch by Lei Zhang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/Triple.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index d8616545908..9154abd6eb3 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -180,6 +180,8 @@ public:
EABIHF,
Android,
Musl,
+ MuslEABI,
+ MuslEABIHF,
MSVC,
Itanium,
@@ -571,6 +573,13 @@ public:
/// Tests whether the target is Android
bool isAndroid() const { return getEnvironment() == Triple::Android; }
+ /// Tests whether the environment is musl-libc
+ bool isMusl() const {
+ return getEnvironment() == Triple::Musl ||
+ getEnvironment() == Triple::MuslEABI ||
+ getEnvironment() == Triple::MuslEABIHF;
+ }
+
/// Tests whether the target is NVPTX (32- or 64-bit).
bool isNVPTX() const {
return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;