Skip to content
Browse files

Add bare metal 'elf' environment

  • Loading branch information...
1 parent 0f5bbcc commit f9e049b274b4a46ee27562cb01da44e82e221650 @sbourdeauducq sbourdeauducq committed
Showing with 5 additions and 1 deletion.
  1. +2 −1 include/llvm/ADT/Triple.h
  2. +3 −0 lib/Support/Triple.cpp
View
3 include/llvm/ADT/Triple.h
@@ -106,7 +106,8 @@ class Triple {
GNU,
GNUEABI,
EABI,
- MachO
+ MachO,
+ ELF
};
private:
View
3 lib/Support/Triple.cpp
@@ -128,6 +128,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case GNUEABI: return "gnueabi";
case EABI: return "eabi";
case MachO: return "macho";
+ case ELF: return "elf";
}
return "<invalid>";
@@ -388,6 +389,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) {
if (EnvironmentName.startswith("eabi"))
return EABI;
+ if (EnvironmentName.startswith("elf"))
+ return ELF;
else if (EnvironmentName.startswith("gnueabi"))
return GNUEABI;
else if (EnvironmentName.startswith("gnu"))

0 comments on commit f9e049b

Please sign in to comment.
Something went wrong with that request. Please try again.