Home | History | Annotate | Download | only in ADT

Lines Matching defs:Triple

1 //===-- llvm/ADT/Triple.h - Target triple helper class ----------*- C++ -*-===//
23 /// Triple - Helper class for working with autoconf configuration names. For
37 /// At its core the Triple class is designed to be a wrapper for a triple
38 /// string; the constructor does not change or normalize the triple string.
44 class Triple {
218 /// triple fields unknown.
219 Triple() : Data(), Arch(), Vendor(), OS(), Environment(), ObjectFormat() {}
221 explicit Triple(const Twine &Str);
222 Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr);
223 Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr,
226 bool operator==(const Triple &Other) const {
238 /// triple form (or something sensible that the Triple class understands if
243 /// Return the normalized form of this triple's string.
250 /// getArch - Get the parsed architecture type of this triple.
253 /// getSubArch - get the parsed subarchitecture type for this triple.
256 /// getVendor - Get the parsed vendor type of this triple.
259 /// getOS - Get the parsed operating system type of this triple.
262 /// hasEnvironment - Does this triple have the optional environment
268 /// getEnvironment - Get the parsed environment type of this triple.
272 /// triple, if present.
280 /// getFormat - Get the object format for this triple.
284 /// triple, if present.
325 /// triple.
328 /// getVendorName - Get the vendor (second) component of the triple.
332 /// triple.
336 /// component of the triple, or "" if empty.
353 /// is not summed up in the triple, and so only a coarse grained predicate
368 /// numbers included in the target triple.
384 bool isOSVersionLT(const Triple &Other) const {
395 assert(isMacOSX() && "Not an OS X triple!");
398 if (getOS() == Triple::MacOSX)
406 /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
409 return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
412 /// Is this an iOS triple.
418 return getOS() == Triple::IOS || isTvOS();
421 /// Is this an Apple tvOS triple.
423 return getOS() == Triple::TvOS;
426 /// Is this an Apple watchOS triple.
428 return getOS() == Triple::WatchOS;
437 return getOS() == Triple::NetBSD;
441 return getOS() == Triple::OpenBSD;
445 return getOS() == Triple::FreeBSD;
448 bool isOSDragonFly() const { return getOS() == Triple::DragonFly; }
451 return getOS() == Triple::Solaris;
455 return getOS() == Triple::Bitrig;
459 return getOS() == Triple::ELFIAMCU;
464 return getOS() == Triple::Win32 &&
465 (getEnvironment() == Triple::UnknownEnvironment ||
466 getEnvironment() == Triple::MSVC);
471 return getOS() == Triple::Win32 && getEnvironment() == Triple::MSVC;
475 return getOS() == Triple::Win32 && getEnvironment() == Triple::CoreCLR;
479 return getOS() == Triple::Win32 && getEnvironment() == Triple::Itanium;
483 return getOS() == Triple::Win32 && getEnvironment() == Triple::Cygnus;
487 return getOS() == Triple::Win32 && getEnvironment() == Triple::GNU;
503 return getOS() == Triple::Win32;
508 return getOS() == Triple::NaCl;
513 return getOS() == Triple::Linux;
518 return getObjectFormat() == Triple::ELF;
523 return getObjectFormat() == Triple::COFF;
528 return getObjectFormat() == Triple::MachO;
533 return getArch() == Triple::x86_64 &&
534 getVendor() == Triple::SCEI &&
535 getOS() == Triple::PS4;
540 return getVendor() == Triple::SCEI &&
541 getOS() == Triple::PS4;
545 Triple::Android; }
551 /// setArch - Set the architecture (first) component of the triple
555 /// setVendor - Set the vendor (second) component of the triple to a
559 /// setOS - Set the operating system (third) component of the triple
563 /// setEnvironment - Set the environment (fourth) component of the triple
570 /// setTriple - Set all components to the new triple \p Str.
574 /// triple by name.
577 /// setVendorName - Set the vendor (second) component of the triple
582 /// triple by name.
586 /// component of the triple by name.
594 /// @name Helpers to build variants of a particular triple.
597 /// Form a triple with a 32-bit variant of the current architecture.
601 /// \returns A new triple with a 32-bit architecture or an unknown
603 llvm::Triple get32BitArchVariant() const;
605 /// Form a triple with a 64-bit variant of the current architecture.
609 /// \returns A new triple with a 64-bit architecture or an unknown
611 llvm::Triple get64BitArchVariant() const;
613 /// Form a triple with a big endian variant of the current architecture.
617 /// \returns A new triple with a big endian architecture or an unknown
619 llvm::Triple getBigEndianArchVariant() const;
621 /// Form a triple with a little endian variant of the current architecture.
625 /// \returns A new triple with a little endian architecture or an unknown
627 llvm::Triple getLittleEndianArchVariant() const;
632 /// string then the triple's arch name is used.