Skip to content

Commit

Permalink
Add bare metal 'elf' environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed May 29, 2012
1 parent 0f5bbcc commit f9e049b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/llvm/ADT/Triple.h
Expand Up @@ -106,7 +106,8 @@ class Triple {
GNU, GNU,
GNUEABI, GNUEABI,
EABI, EABI,
MachO MachO,
ELF
}; };


private: private:
Expand Down
3 changes: 3 additions & 0 deletions lib/Support/Triple.cpp
Expand Up @@ -128,6 +128,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case GNUEABI: return "gnueabi"; case GNUEABI: return "gnueabi";
case EABI: return "eabi"; case EABI: return "eabi";
case MachO: return "macho"; case MachO: return "macho";
case ELF: return "elf";
} }


return "<invalid>"; return "<invalid>";
Expand Down Expand Up @@ -388,6 +389,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) { Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) {
if (EnvironmentName.startswith("eabi")) if (EnvironmentName.startswith("eabi"))
return EABI; return EABI;
if (EnvironmentName.startswith("elf"))
return ELF;
else if (EnvironmentName.startswith("gnueabi")) else if (EnvironmentName.startswith("gnueabi"))
return GNUEABI; return GNUEABI;
else if (EnvironmentName.startswith("gnu")) else if (EnvironmentName.startswith("gnu"))
Expand Down

0 comments on commit f9e049b

Please sign in to comment.