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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 tce, // TCE (http://tce.cs.tut.fi/): tce | 68 tce, // TCE (http://tce.cs.tut.fi/): tce |
69 thumb, // Thumb (little endian): thumb, thumbv.* | 69 thumb, // Thumb (little endian): thumb, thumbv.* |
70 thumbeb, // Thumb (big endian): thumbeb | 70 thumbeb, // Thumb (big endian): thumbeb |
71 x86, // X86: i[3-9]86 | 71 x86, // X86: i[3-9]86 |
72 x86_64, // X86-64: amd64, x86_64 | 72 x86_64, // X86-64: amd64, x86_64 |
73 xcore, // XCore: xcore | 73 xcore, // XCore: xcore |
74 nvptx, // NVPTX: 32-bit | 74 nvptx, // NVPTX: 32-bit |
75 nvptx64, // NVPTX: 64-bit | 75 nvptx64, // NVPTX: 64-bit |
76 le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) | 76 le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) |
77 le64, // le64: generic little-endian 64-bit CPU (PNaCl / Emscripten) | 77 le64, // le64: generic little-endian 64-bit CPU (PNaCl / Emscripten) |
78 asmjs, // asm.js JavaScript subset @LOCALMOD Emscripten | |
79 amdil, // AMDIL | 78 amdil, // AMDIL |
80 amdil64, // AMDIL with 64-bit pointers | 79 amdil64, // AMDIL with 64-bit pointers |
81 hsail, // AMD HSAIL | 80 hsail, // AMD HSAIL |
82 hsail64, // AMD HSAIL with 64-bit pointers | 81 hsail64, // AMD HSAIL with 64-bit pointers |
83 spir, // SPIR: standard portable IR for OpenCL 32-bit version | 82 spir, // SPIR: standard portable IR for OpenCL 32-bit version |
84 spir64, // SPIR: standard portable IR for OpenCL 64-bit version | 83 spir64, // SPIR: standard portable IR for OpenCL 64-bit version |
85 kalimba // Kalimba: generic kalimba | 84 kalimba // Kalimba: generic kalimba |
86 }; | 85 }; |
87 enum SubArchType { | 86 enum SubArchType { |
88 NoSubArch, | 87 NoSubArch, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 Linux, | 131 Linux, |
133 Lv2, // PS3 | 132 Lv2, // PS3 |
134 MacOSX, | 133 MacOSX, |
135 NetBSD, | 134 NetBSD, |
136 OpenBSD, | 135 OpenBSD, |
137 Solaris, | 136 Solaris, |
138 Win32, | 137 Win32, |
139 Haiku, | 138 Haiku, |
140 Minix, | 139 Minix, |
141 RTEMS, | 140 RTEMS, |
142 Emscripten, // Emscripten JavaScript runtime @LOCALMOD Emscripten | |
143 NaCl, // Native Client | 141 NaCl, // Native Client |
144 CNK, // BG/P Compute-Node Kernel | 142 CNK, // BG/P Compute-Node Kernel |
145 Bitrig, | 143 Bitrig, |
146 AIX, | 144 AIX, |
147 CUDA, // NVIDIA CUDA | 145 CUDA, // NVIDIA CUDA |
148 NVCL, // NVIDIA OpenCL | 146 NVCL, // NVIDIA OpenCL |
149 AMDHSA, // AMD HSA Runtime | 147 AMDHSA, // AMD HSA Runtime |
150 PS4 | 148 PS4 |
151 }; | 149 }; |
152 enum EnvironmentType { | 150 enum EnvironmentType { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 bool isOSBitrig() const { return false; } | 394 bool isOSBitrig() const { return false; } |
397 bool isWindowsMSVCEnvironment() const { return false; } | 395 bool isWindowsMSVCEnvironment() const { return false; } |
398 bool isKnownWindowsMSVCEnvironment() const { return false; } | 396 bool isKnownWindowsMSVCEnvironment() const { return false; } |
399 bool isWindowsItaniumEnvironment() const { return false; } | 397 bool isWindowsItaniumEnvironment() const { return false; } |
400 bool isWindowsCygwinEnvironment() const { return false; } | 398 bool isWindowsCygwinEnvironment() const { return false; } |
401 bool isWindowsGNUEnvironment() const { return false; } | 399 bool isWindowsGNUEnvironment() const { return false; } |
402 bool isOSCygMing() const { return false; } | 400 bool isOSCygMing() const { return false; } |
403 bool isOSMSVCRT() const { return false; } | 401 bool isOSMSVCRT() const { return false; } |
404 bool isOSWindows() const { return false; } | 402 bool isOSWindows() const { return false; } |
405 bool isOSNaCl() const { return getOS() == Triple::NaCl; } | 403 bool isOSNaCl() const { return getOS() == Triple::NaCl; } |
406 bool isOSEmscripten() const { return false; } | |
407 bool isOSLinux() const { return getOS() == Triple::Linux; } | 404 bool isOSLinux() const { return getOS() == Triple::Linux; } |
408 bool isOSBinFormatELF() const { return true; } | 405 bool isOSBinFormatELF() const { return true; } |
409 bool isOSBinFormatCOFF() const { return false; } | 406 bool isOSBinFormatCOFF() const { return false; } |
410 bool isOSBinFormatMachO() const { return false; } | 407 bool isOSBinFormatMachO() const { return false; } |
411 bool isPS4CPU() const { return false; } | 408 bool isPS4CPU() const { return false; } |
412 bool isPS4() const { return false; } | 409 bool isPS4() const { return false; } |
413 #elif defined(__EMSCRIPTEN__) | 410 #elif defined(__EMSCRIPTEN__) |
414 bool isMacOSX() const { return false; } | 411 bool isMacOSX() const { return false; } |
415 bool isiOS() const { return false; } | 412 bool isiOS() const { return false; } |
416 bool isOSDarwin() const { return false; } | 413 bool isOSDarwin() const { return false; } |
417 bool isOSNetBSD() const { return false; } | 414 bool isOSNetBSD() const { return false; } |
418 bool isOSOpenBSD() const { return false; } | 415 bool isOSOpenBSD() const { return false; } |
419 bool isOSFreeBSD() const { return false; } | 416 bool isOSFreeBSD() const { return false; } |
420 bool isOSDragonFly() const { return false; } | 417 bool isOSDragonFly() const { return false; } |
421 bool isOSSolaris() const { return false; } | 418 bool isOSSolaris() const { return false; } |
422 bool isOSBitrig() const { return false; } | 419 bool isOSBitrig() const { return false; } |
423 bool isWindowsMSVCEnvironment() const { return false; } | 420 bool isWindowsMSVCEnvironment() const { return false; } |
424 bool isKnownWindowsMSVCEnvironment() const { return false; } | 421 bool isKnownWindowsMSVCEnvironment() const { return false; } |
425 bool isWindowsItaniumEnvironment() const { return false; } | 422 bool isWindowsItaniumEnvironment() const { return false; } |
426 bool isWindowsCygwinEnvironment() const { return false; } | 423 bool isWindowsCygwinEnvironment() const { return false; } |
427 bool isWindowsGNUEnvironment() const { return false; } | 424 bool isWindowsGNUEnvironment() const { return false; } |
428 bool isOSCygMing() const { return false; } | 425 bool isOSCygMing() const { return false; } |
429 bool isOSMSVCRT() const { return false; } | 426 bool isOSMSVCRT() const { return false; } |
430 bool isOSWindows() const { return false; } | 427 bool isOSWindows() const { return false; } |
431 bool isOSNaCl() const { return false; } | 428 bool isOSNaCl() const { return false; } |
432 bool isOSEmscripten() const { return true; } | |
433 bool isOSLinux() const { return false; } | 429 bool isOSLinux() const { return false; } |
434 bool isOSBinFormatELF() const { return true; } | 430 bool isOSBinFormatELF() const { return true; } |
435 bool isOSBinFormatCOFF() const { return false; } | 431 bool isOSBinFormatCOFF() const { return false; } |
436 bool isOSBinFormatMachO() const { return false; } | 432 bool isOSBinFormatMachO() const { return false; } |
437 bool isPS4CPU() const { return false; } | 433 bool isPS4CPU() const { return false; } |
438 bool isPS4() const { return false; } | 434 bool isPS4() const { return false; } |
439 #else | 435 #else |
440 /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both | 436 /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both |
441 /// "darwin" and "osx" as OS X triples. | 437 /// "darwin" and "osx" as OS X triples. |
442 bool isMacOSX() const { | 438 bool isMacOSX() const { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 /// \brief Tests whether the OS is Windows. | 507 /// \brief Tests whether the OS is Windows. |
512 bool isOSWindows() const { | 508 bool isOSWindows() const { |
513 return getOS() == Triple::Win32; | 509 return getOS() == Triple::Win32; |
514 } | 510 } |
515 | 511 |
516 /// \brief Tests whether the OS is NaCl (Native Client) | 512 /// \brief Tests whether the OS is NaCl (Native Client) |
517 bool isOSNaCl() const { | 513 bool isOSNaCl() const { |
518 return getOS() == Triple::NaCl; | 514 return getOS() == Triple::NaCl; |
519 } | 515 } |
520 | 516 |
521 // @LOCALMOD-START Emscripten | |
522 /// \brief Tests whether the OS is Emscripten. | |
523 bool isOSEmscripten() const { | |
524 return getOS() == Triple::Emscripten; | |
525 } | |
526 // @LOCALMOD-END Emscripten | |
527 | |
528 /// \brief Tests whether the OS is Linux. | 517 /// \brief Tests whether the OS is Linux. |
529 bool isOSLinux() const { | 518 bool isOSLinux() const { |
530 return getOS() == Triple::Linux; | 519 return getOS() == Triple::Linux; |
531 } | 520 } |
532 | 521 |
533 /// \brief Tests whether the OS uses the ELF binary format. | 522 /// \brief Tests whether the OS uses the ELF binary format. |
534 bool isOSBinFormatELF() const { | 523 bool isOSBinFormatELF() const { |
535 return getObjectFormat() == Triple::ELF; | 524 return getObjectFormat() == Triple::ELF; |
536 } | 525 } |
537 | 526 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 /// architecture name (e.g., "x86"). | 654 /// architecture name (e.g., "x86"). |
666 static ArchType getArchTypeForLLVMName(StringRef Str); | 655 static ArchType getArchTypeForLLVMName(StringRef Str); |
667 | 656 |
668 /// @} | 657 /// @} |
669 }; | 658 }; |
670 | 659 |
671 } // End llvm namespace | 660 } // End llvm namespace |
672 | 661 |
673 | 662 |
674 #endif | 663 #endif |
OLD | NEW |