ADT: add a helper to check if the Triple is ARM64

Add a trivial helper for checking if the architecture is AArch64 Little
Endian or Big Endian.

llvm-svn: 316837
This commit is contained in:
Saleem Abdulrasool 2017-10-28 19:15:05 +00:00
parent 72db888389
commit 0f759db2bd
1 changed files with 5 additions and 0 deletions

View File

@ -655,6 +655,11 @@ public:
return getArch() == Triple::arm || getArch() == Triple::armeb;
}
/// Tests whether the target is AArch64 (little and big endian).
bool isAArch64() const {
return getArch() == Triple::aarch64 || getArch() == Triple::aarch64_be;
}
/// Tests wether the target supports comdat
bool supportsCOMDAT() const { return !isOSBinFormatMachO(); }