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
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/llvm/ADT/Triple.h
Original file line number Diff line number Diff line change
@@ -106,7 +106,8 @@ class Triple {
GNU,
GNUEABI,
EABI,
MachO
MachO,
ELF
};

private:
3 changes: 3 additions & 0 deletions lib/Support/Triple.cpp
Original file line number Diff line number Diff line change
@@ -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.