[llvm] r316837 - ADT: add a helper to check if the Triple is ARM64
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 28 12:15:06 PDT 2017
Author: compnerd
Date: Sat Oct 28 12:15:05 2017
New Revision: 316837
URL: http://llvm.org/viewvc/llvm-project?rev=316837&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/ADT/Triple.h
Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=316837&r1=316836&r2=316837&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Sat Oct 28 12:15:05 2017
@@ -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(); }
More information about the llvm-commits
mailing list