summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEd Schouten <ed@80386.nl>2015-03-09 18:40:45 +0000
committerEd Schouten <ed@80386.nl>2015-03-09 18:40:45 +0000
commitdae7189c816a7a687dc76beb6282c24e2232df6e (patch)
tree2a4ccccd72601e135fd0fbfdc287b17fcb27af8b /llvm/lib
parentae219d3d3ccff558f24f96efcb473ea569237aa6 (diff)
downloadbcm5719-llvm-dae7189c816a7a687dc76beb6282c24e2232df6e.tar.gz
bcm5719-llvm-dae7189c816a7a687dc76beb6282c24e2232df6e.zip
Add support for Nuxi CloudABI.
CloudABI is a POSIX-like runtime environment built around the concept of capability-based security. More details: https://github.com/NuxiNL/cloudlibc CloudABI uses its own ELFOSABI number. This number has been allocated by the maintainers of ELF a couple of days ago. Reviewed by: echristo llvm-svn: 231681
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Object/ELFYAML.cpp1
-rw-r--r--llvm/lib/Support/Triple.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELFYAML.cpp b/llvm/lib/Object/ELFYAML.cpp
index cce05cf7124..19527e2d040 100644
--- a/llvm/lib/Object/ELFYAML.cpp
+++ b/llvm/lib/Object/ELFYAML.cpp
@@ -235,6 +235,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI>::enumeration(
ECase(ELFOSABI_NSK)
ECase(ELFOSABI_AROS)
ECase(ELFOSABI_FENIXOS)
+ ECase(ELFOSABI_CLOUDABI)
ECase(ELFOSABI_C6000_ELFABI)
ECase(ELFOSABI_C6000_LINUX)
ECase(ELFOSABI_ARM)
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 33472e51d17..59a7ba14826 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -141,6 +141,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
switch (Kind) {
case UnknownOS: return "unknown";
+ case CloudABI: return "cloudabi";
case Darwin: return "darwin";
case DragonFly: return "dragonfly";
case FreeBSD: return "freebsd";
@@ -345,6 +346,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
static Triple::OSType parseOS(StringRef OSName) {
return StringSwitch<Triple::OSType>(OSName)
+ .StartsWith("cloudabi", Triple::CloudABI)
.StartsWith("darwin", Triple::Darwin)
.StartsWith("dragonfly", Triple::DragonFly)
.StartsWith("freebsd", Triple::FreeBSD)
OpenPOWER on IntegriCloud