Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: include/llvm/ADT/Triple.h

Issue 1024073002: LLVM: add support for asmjs arch and Emscripten OS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Address comments. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/Support/Triple.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/ADT/Triple.h
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 419b8e9622a842648015ef11b65fcabe742d14be..956d0e7416b0c6fc47c88ba202bde2ef0f160872 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -73,6 +73,7 @@ public:
nvptx64, // NVPTX: 64-bit
le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten)
le64, // le64: generic little-endian 64-bit CPU (PNaCl / Emscripten)
+ asmjs, // asm.js JavaScript subset @LOCALMOD Emscripten
amdil, // AMDIL
amdil64, // AMDIL with 64-bit pointers
hsail, // AMD HSAIL
@@ -133,6 +134,7 @@ public:
Haiku,
Minix,
RTEMS,
+ Emscripten, // Emscripten JavaScript runtime @LOCALMOD Emscripten
NaCl, // Native Client
CNK, // BG/P Compute-Node Kernel
Bitrig,
@@ -378,6 +380,30 @@ public:
bool isOSMSVCRT() const { return false; }
bool isOSWindows() const { return false; }
bool isOSNaCl() const { return true; }
+ bool isOSEmscripten() const { return false; }
+ bool isOSLinux() const { return false; }
+ bool isOSBinFormatELF() const { return true; }
+ bool isOSBinFormatCOFF() const { return false; }
+ bool isOSBinFormatMachO() const { return false; }
+#elif defined(__EMSCRIPTEN__)
+ bool isMacOSX() const { return false; }
+ bool isiOS() const { return false; }
+ bool isOSDarwin() const { return false; }
+ bool isOSNetBSD() const { return false; }
+ bool isOSOpenBSD() const { return false; }
+ bool isOSFreeBSD() const { return false; }
+ bool isOSSolaris() const { return false; }
+ bool isOSBitrig() const { return false; }
+ bool isWindowsMSVCEnvironment() const { return false; }
+ bool isKnownWindowsMSVCEnvironment() const { return false; }
+ bool isWindowsItaniumEnvironment() const { return false; }
+ bool isWindowsCygwinEnvironment() const { return false; }
+ bool isWindowsGNUEnvironment() const { return false; }
+ bool isOSCygMing() const { return false; }
+ bool isOSMSVCRT() const { return false; }
+ bool isOSWindows() const { return false; }
+ bool isOSNaCl() const { return false; }
+ bool isOSEmscripten() const { return true; }
bool isOSLinux() const { return false; }
bool isOSBinFormatELF() const { return true; }
bool isOSBinFormatCOFF() const { return false; }
@@ -462,6 +488,13 @@ public:
return getOS() == Triple::NaCl;
}
+ // @LOCALMOD-START Emscripten
+ /// \brief Tests whether the OS is Emscripten.
+ bool isOSEmscripten() const {
+ return getOS() == Triple::Emscripten;
+ }
+ // @LOCALMOD-END Emscripten
+
/// \brief Tests whether the OS is Linux.
bool isOSLinux() const {
return getOS() == Triple::Linux;
« no previous file with comments | « no previous file | lib/Support/Triple.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698