Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add bare metal 'elf' environment
  • 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,
GNUEABI,
EABI,
MachO
MachO,
ELF
};

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 EABI: return "eabi";
case MachO: return "macho";
case ELF: return "elf";
}

return "<invalid>";
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit f9e049b

Please sign in to comment.