summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/Triple.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-02-06 20:46:33 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-02-06 20:46:33 +0000
commit7d5a289f2d7d75c29df4c17856ab54dd28dec508 (patch)
treed64645784013e08a3bb39c9f33d02a457cc40877 /include/llvm/ADT/Triple.h
parentfccf0623ee35e0bbbbf0ba963a5500b7fd87fa11 (diff)
downloadllvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.tar.gz
llvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.tar.bz2
llvm-7d5a289f2d7d75c29df4c17856ab54dd28dec508.tar.xz
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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 3a20aad386..f5f96a2261 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.
/// @{