diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-02-06 20:46:33 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-02-06 20:46:33 +0000 |
commit | 7d5a289f2d7d75c29df4c17856ab54dd28dec508 (patch) | |
tree | d64645784013e08a3bb39c9f33d02a457cc40877 /include/llvm/ADT/Triple.h | |
parent | fccf0623ee35e0bbbbf0ba963a5500b7fd87fa11 (diff) | |
download | external_llvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.zip external_llvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.tar.gz external_llvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.tar.bz2 |
Introduce helpers to compute the 32-bit varaints and 64-bit variants of
some architectures. These are useful for interacting with multiarch or
bi-arch GCC (or GCC-based) toolchains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/Triple.h')
-rw-r--r-- | include/llvm/ADT/Triple.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 3a20aad..f5f96a2 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -385,6 +385,26 @@ public: const char *getArchNameForAssembler(); /// @} + /// @name Helpers to build variants of a particular triple. + /// @{ + + /// \brief Form a triple with a 32-bit variant of the current architecture. + /// + /// This can be used to move across "families" of architectures where useful. + /// + /// \returns A new triple with a 32-bit architecture or an unknown + /// architecture if no such variant can be found. + llvm::Triple get32BitArchVariant() const; + + /// \brief Form a triple with a 64-bit variant of the current architecture. + /// + /// This can be used to move across "families" of architectures where useful. + /// + /// \returns A new triple with a 64-bit architecture or an unknown + /// architecture if no such variant can be found. + llvm::Triple get64BitArchVariant() const; + + /// @} /// @name Static helpers for IDs. /// @{ |