Skip to content

Commit f9e049b

Browse files
author
Sebastien Bourdeauducq
committedMay 29, 2012
Add bare metal 'elf' environment
1 parent 0f5bbcc commit f9e049b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎include/llvm/ADT/Triple.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ class Triple {
106106
GNU,
107107
GNUEABI,
108108
EABI,
109-
MachO
109+
MachO,
110+
ELF
110111
};
111112

112113
private:

‎lib/Support/Triple.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
128128
case GNUEABI: return "gnueabi";
129129
case EABI: return "eabi";
130130
case MachO: return "macho";
131+
case ELF: return "elf";
131132
}
132133

133134
return "<invalid>";
@@ -388,6 +389,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
388389
Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) {
389390
if (EnvironmentName.startswith("eabi"))
390391
return EABI;
392+
if (EnvironmentName.startswith("elf"))
393+
return ELF;
391394
else if (EnvironmentName.startswith("gnueabi"))
392395
return GNUEABI;
393396
else if (EnvironmentName.startswith("gnu"))

0 commit comments

Comments
 (0)
Please sign in to comment.