| OLD | NEW |
| 1 //===-- llvm/ADT/Triple.h - Target triple helper class ----------*- C++ -*-===// | 1 //===-- llvm/ADT/Triple.h - Target triple helper class ----------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 | 9 |
| 10 #ifndef LLVM_ADT_TRIPLE_H | 10 #ifndef LLVM_ADT_TRIPLE_H |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 tce, // TCE (http://tce.cs.tut.fi/): tce | 66 tce, // TCE (http://tce.cs.tut.fi/): tce |
| 67 thumb, // Thumb (little endian): thumb, thumbv.* | 67 thumb, // Thumb (little endian): thumb, thumbv.* |
| 68 thumbeb, // Thumb (big endian): thumbeb | 68 thumbeb, // Thumb (big endian): thumbeb |
| 69 x86, // X86: i[3-9]86 | 69 x86, // X86: i[3-9]86 |
| 70 x86_64, // X86-64: amd64, x86_64 | 70 x86_64, // X86-64: amd64, x86_64 |
| 71 xcore, // XCore: xcore | 71 xcore, // XCore: xcore |
| 72 nvptx, // NVPTX: 32-bit | 72 nvptx, // NVPTX: 32-bit |
| 73 nvptx64, // NVPTX: 64-bit | 73 nvptx64, // NVPTX: 64-bit |
| 74 le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) | 74 le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) |
| 75 le64, // le64: generic little-endian 64-bit CPU (PNaCl / Emscripten) | 75 le64, // le64: generic little-endian 64-bit CPU (PNaCl / Emscripten) |
| 76 asmjs, // asm.js JavaScript subset @LOCALMOD Emscripten |
| 76 amdil, // AMDIL | 77 amdil, // AMDIL |
| 77 amdil64, // AMDIL with 64-bit pointers | 78 amdil64, // AMDIL with 64-bit pointers |
| 78 hsail, // AMD HSAIL | 79 hsail, // AMD HSAIL |
| 79 hsail64, // AMD HSAIL with 64-bit pointers | 80 hsail64, // AMD HSAIL with 64-bit pointers |
| 80 spir, // SPIR: standard portable IR for OpenCL 32-bit version | 81 spir, // SPIR: standard portable IR for OpenCL 32-bit version |
| 81 spir64, // SPIR: standard portable IR for OpenCL 64-bit version | 82 spir64, // SPIR: standard portable IR for OpenCL 64-bit version |
| 82 kalimba // Kalimba: generic kalimba | 83 kalimba // Kalimba: generic kalimba |
| 83 }; | 84 }; |
| 84 enum SubArchType { | 85 enum SubArchType { |
| 85 NoSubArch, | 86 NoSubArch, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Linux, | 127 Linux, |
| 127 Lv2, // PS3 | 128 Lv2, // PS3 |
| 128 MacOSX, | 129 MacOSX, |
| 129 NetBSD, | 130 NetBSD, |
| 130 OpenBSD, | 131 OpenBSD, |
| 131 Solaris, | 132 Solaris, |
| 132 Win32, | 133 Win32, |
| 133 Haiku, | 134 Haiku, |
| 134 Minix, | 135 Minix, |
| 135 RTEMS, | 136 RTEMS, |
| 137 Emscripten, // Emscripten JavaScript runtime @LOCALMOD Emscripten |
| 136 NaCl, // Native Client | 138 NaCl, // Native Client |
| 137 CNK, // BG/P Compute-Node Kernel | 139 CNK, // BG/P Compute-Node Kernel |
| 138 Bitrig, | 140 Bitrig, |
| 139 AIX, | 141 AIX, |
| 140 CUDA, // NVIDIA CUDA | 142 CUDA, // NVIDIA CUDA |
| 141 NVCL // NVIDIA OpenCL | 143 NVCL // NVIDIA OpenCL |
| 142 }; | 144 }; |
| 143 enum EnvironmentType { | 145 enum EnvironmentType { |
| 144 UnknownEnvironment, | 146 UnknownEnvironment, |
| 145 | 147 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 bool isOSBitrig() const { return false; } | 373 bool isOSBitrig() const { return false; } |
| 372 bool isWindowsMSVCEnvironment() const { return false; } | 374 bool isWindowsMSVCEnvironment() const { return false; } |
| 373 bool isKnownWindowsMSVCEnvironment() const { return false; } | 375 bool isKnownWindowsMSVCEnvironment() const { return false; } |
| 374 bool isWindowsItaniumEnvironment() const { return false; } | 376 bool isWindowsItaniumEnvironment() const { return false; } |
| 375 bool isWindowsCygwinEnvironment() const { return false; } | 377 bool isWindowsCygwinEnvironment() const { return false; } |
| 376 bool isWindowsGNUEnvironment() const { return false; } | 378 bool isWindowsGNUEnvironment() const { return false; } |
| 377 bool isOSCygMing() const { return false; } | 379 bool isOSCygMing() const { return false; } |
| 378 bool isOSMSVCRT() const { return false; } | 380 bool isOSMSVCRT() const { return false; } |
| 379 bool isOSWindows() const { return false; } | 381 bool isOSWindows() const { return false; } |
| 380 bool isOSNaCl() const { return true; } | 382 bool isOSNaCl() const { return true; } |
| 383 bool isOSEmscripten() const { return false; } |
| 381 bool isOSLinux() const { return false; } | 384 bool isOSLinux() const { return false; } |
| 382 bool isOSBinFormatELF() const { return true; } | 385 bool isOSBinFormatELF() const { return true; } |
| 383 bool isOSBinFormatCOFF() const { return false; } | 386 bool isOSBinFormatCOFF() const { return false; } |
| 387 bool isOSBinFormatMachO() const { return false; } |
| 388 #elif defined(__EMSCRIPTEN__) |
| 389 bool isMacOSX() const { return false; } |
| 390 bool isiOS() const { return false; } |
| 391 bool isOSDarwin() const { return false; } |
| 392 bool isOSNetBSD() const { return false; } |
| 393 bool isOSOpenBSD() const { return false; } |
| 394 bool isOSFreeBSD() const { return false; } |
| 395 bool isOSSolaris() const { return false; } |
| 396 bool isOSBitrig() const { return false; } |
| 397 bool isWindowsMSVCEnvironment() const { return false; } |
| 398 bool isKnownWindowsMSVCEnvironment() const { return false; } |
| 399 bool isWindowsItaniumEnvironment() const { return false; } |
| 400 bool isWindowsCygwinEnvironment() const { return false; } |
| 401 bool isWindowsGNUEnvironment() const { return false; } |
| 402 bool isOSCygMing() const { return false; } |
| 403 bool isOSMSVCRT() const { return false; } |
| 404 bool isOSWindows() const { return false; } |
| 405 bool isOSNaCl() const { return false; } |
| 406 bool isOSEmscripten() const { return true; } |
| 407 bool isOSLinux() const { return false; } |
| 408 bool isOSBinFormatELF() const { return true; } |
| 409 bool isOSBinFormatCOFF() const { return false; } |
| 384 bool isOSBinFormatMachO() const { return false; } | 410 bool isOSBinFormatMachO() const { return false; } |
| 385 #else | 411 #else |
| 386 /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both | 412 /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both |
| 387 /// "darwin" and "osx" as OS X triples. | 413 /// "darwin" and "osx" as OS X triples. |
| 388 bool isMacOSX() const { | 414 bool isMacOSX() const { |
| 389 return getOS() == Triple::Darwin || getOS() == Triple::MacOSX; | 415 return getOS() == Triple::Darwin || getOS() == Triple::MacOSX; |
| 390 } | 416 } |
| 391 | 417 |
| 392 /// Is this an iOS triple. | 418 /// Is this an iOS triple. |
| 393 bool isiOS() const { | 419 bool isiOS() const { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 /// \brief Tests whether the OS is Windows. | 481 /// \brief Tests whether the OS is Windows. |
| 456 bool isOSWindows() const { | 482 bool isOSWindows() const { |
| 457 return getOS() == Triple::Win32 || isOSCygMing(); | 483 return getOS() == Triple::Win32 || isOSCygMing(); |
| 458 } | 484 } |
| 459 | 485 |
| 460 /// \brief Tests whether the OS is NaCl (Native Client) | 486 /// \brief Tests whether the OS is NaCl (Native Client) |
| 461 bool isOSNaCl() const { | 487 bool isOSNaCl() const { |
| 462 return getOS() == Triple::NaCl; | 488 return getOS() == Triple::NaCl; |
| 463 } | 489 } |
| 464 | 490 |
| 491 // @LOCALMOD-START Emscripten |
| 492 /// \brief Tests whether the OS is Emscripten. |
| 493 bool isOSEmscripten() const { |
| 494 return getOS() == Triple::Emscripten; |
| 495 } |
| 496 // @LOCALMOD-END Emscripten |
| 497 |
| 465 /// \brief Tests whether the OS is Linux. | 498 /// \brief Tests whether the OS is Linux. |
| 466 bool isOSLinux() const { | 499 bool isOSLinux() const { |
| 467 return getOS() == Triple::Linux; | 500 return getOS() == Triple::Linux; |
| 468 } | 501 } |
| 469 | 502 |
| 470 /// \brief Tests whether the OS uses the ELF binary format. | 503 /// \brief Tests whether the OS uses the ELF binary format. |
| 471 bool isOSBinFormatELF() const { | 504 bool isOSBinFormatELF() const { |
| 472 return getObjectFormat() == Triple::ELF; | 505 return getObjectFormat() == Triple::ELF; |
| 473 } | 506 } |
| 474 | 507 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 /// architecture name (e.g., "x86"). | 622 /// architecture name (e.g., "x86"). |
| 590 static ArchType getArchTypeForLLVMName(StringRef Str); | 623 static ArchType getArchTypeForLLVMName(StringRef Str); |
| 591 | 624 |
| 592 /// @} | 625 /// @} |
| 593 }; | 626 }; |
| 594 | 627 |
| 595 } // End llvm namespace | 628 } // End llvm namespace |
| 596 | 629 |
| 597 | 630 |
| 598 #endif | 631 #endif |
| OLD | NEW |