aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2013-05-04 07:15:13 +0000
committerTim Northover <Tim.Northover@arm.com>2013-05-04 07:15:13 +0000
commitff920eec4d449bee560d8d99636ad0eb50cd9d8d (patch)
treedfb0f682d851cc10e90ac9c5ec479a0d01e4a8a1 /lib/Basic/Targets.cpp
parente96515ad88309260db10cc0cdd2d3e33deab7d31 (diff)
AArch64: teach Clang about __clear_cache intrinsic
libgcc provides a __clear_cache intrinsic on AArch64, much like it does on 32-bit ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 9d78bbebac..cabdffa68c 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3307,6 +3307,8 @@ namespace {
class AArch64TargetInfo : public TargetInfo {
static const char * const GCCRegNames[];
static const TargetInfo::GCCRegAlias GCCRegAliases[];
+
+ static const Builtin::Info BuiltinInfo[];
public:
AArch64TargetInfo(const std::string& triple) : TargetInfo(triple) {
BigEndian = false;
@@ -3375,8 +3377,8 @@ public:
}
virtual void getTargetBuiltins(const Builtin::Info *&Records,
unsigned &NumRecords) const {
- Records = 0;
- NumRecords = 0;
+ Records = BuiltinInfo;
+ NumRecords = clang::AArch64::LastTSBuiltin-Builtin::FirstTSBuiltin;
}
virtual bool hasFeature(StringRef Feature) const {
return Feature == "aarch64";
@@ -3485,6 +3487,14 @@ void AArch64TargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases,
NumAliases = llvm::array_lengthof(GCCRegAliases);
}
+
+const Builtin::Info AArch64TargetInfo::BuiltinInfo[] = {
+#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES },
+#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER,\
+ ALL_LANGUAGES },
+#include "clang/Basic/BuiltinsAArch64.def"
+};
+
} // end anonymous namespace
namespace {