summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 25ce32e4664..b1a245e1b20 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -744,6 +744,7 @@ class PPCTargetInfo : public TargetInfo {
bool HasP8Vector;
bool HasP8Crypto;
bool HasQPX;
+ bool HasHTM;
protected:
std::string ABI;
@@ -751,7 +752,7 @@ protected:
public:
PPCTargetInfo(const llvm::Triple &Triple)
: TargetInfo(Triple), HasVSX(false), HasP8Vector(false),
- HasP8Crypto(false), HasQPX(false) {
+ HasP8Crypto(false), HasQPX(false), HasHTM(false) {
BigEndian = (Triple.getArch() != llvm::Triple::ppc64le);
LongDoubleWidth = LongDoubleAlign = 128;
LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble;
@@ -1026,6 +1027,11 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
continue;
}
+ if (Feature == "htm") {
+ HasHTM = true;
+ continue;
+ }
+
// TODO: Finish this list and add an assert that we've handled them
// all.
}
@@ -1180,6 +1186,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__POWER8_VECTOR__");
if (HasP8Crypto)
Builder.defineMacro("__CRYPTO__");
+ if (HasHTM)
+ Builder.defineMacro("__HTM__");
// FIXME: The following are not yet generated here by Clang, but are
// generated by GCC:
@@ -1235,6 +1243,7 @@ bool PPCTargetInfo::hasFeature(StringRef Feature) const {
.Case("power8-vector", HasP8Vector)
.Case("crypto", HasP8Crypto)
.Case("qpx", HasQPX)
+ .Case("htm", HasHTM)
.Default(false);
}
OpenPOWER on IntegriCloud