[Triple] Add a helper to switch between big/little endian variants

This will be used from clang's driver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2015-07-06 23:58:14 +00:00
parent 34be8041b3
commit 32f3dc455b
3 changed files with 210 additions and 0 deletions

View File

@@ -569,6 +569,22 @@ public:
/// architecture if no such variant can be found.
llvm::Triple get64BitArchVariant() const;
/// Form a triple with a big endian variant of the current architecture.
///
/// This can be used to move across "families" of architectures where useful.
///
/// \returns A new triple with a big endian architecture or an unknown
/// architecture if no such variant can be found.
llvm::Triple getBigEndianArchVariant() const;
/// Form a triple with a little endian variant of the current architecture.
///
/// This can be used to move across "families" of architectures where useful.
///
/// \returns A new triple with a little endian architecture or an unknown
/// architecture if no such variant can be found.
llvm::Triple getLittleEndianArchVariant() const;
/// Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting.
///
/// \param Arch the architecture name (e.g., "armv7s"). If it is an empty