aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-02 17:08:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-02 17:08:09 +0000
commit660d91aa9ee00f68bdb884b29845a39be78bc557 (patch)
treefc3fa42128d5e92a4bf04d3702824ad438b5767a /lib
parentbddbc598a76ae05af106f4e8c1faaa3946a0d7ea (diff)
downloadsrc-660d91aa9ee00f68bdb884b29845a39be78bc557.tar.gz
src-660d91aa9ee00f68bdb884b29845a39be78bc557.zip
Vendor import of clang release_60 branch r324090:vendor/clang/clang-release_60-r324090
Notes
Notes: svn path=/vendor/clang/dist-release_60/; revision=328788 svn path=/vendor/clang/clang-release_60-r324090/; revision=328789; tag=vendor/clang/clang-release_60-r324090
Diffstat (limited to 'lib')
-rw-r--r--lib/Basic/Targets/X86.cpp6
-rw-r--r--lib/Basic/Targets/X86.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Basic/Targets/X86.cpp b/lib/Basic/Targets/X86.cpp
index 0febb98d4684..58c6ddc8ff66 100644
--- a/lib/Basic/Targets/X86.cpp
+++ b/lib/Basic/Targets/X86.cpp
@@ -763,6 +763,10 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
HasPREFETCHWT1 = true;
} else if (Feature == "+clzero") {
HasCLZERO = true;
+ } else if (Feature == "+retpoline") {
+ HasRetpoline = true;
+ } else if (Feature == "+retpoline-external-thunk") {
+ HasRetpolineExternalThunk = true;
}
X86SSEEnum Level = llvm::StringSwitch<X86SSEEnum>(Feature)
@@ -1305,6 +1309,8 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const {
.Case("prfchw", HasPRFCHW)
.Case("rdrnd", HasRDRND)
.Case("rdseed", HasRDSEED)
+ .Case("retpoline", HasRetpoline)
+ .Case("retpoline-external-thunk", HasRetpolineExternalThunk)
.Case("rtm", HasRTM)
.Case("sgx", HasSGX)
.Case("sha", HasSHA)
diff --git a/lib/Basic/Targets/X86.h b/lib/Basic/Targets/X86.h
index cbd6a2d24fb5..590531c17854 100644
--- a/lib/Basic/Targets/X86.h
+++ b/lib/Basic/Targets/X86.h
@@ -96,6 +96,8 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
bool HasCLWB = false;
bool HasMOVBE = false;
bool HasPREFETCHWT1 = false;
+ bool HasRetpoline = false;
+ bool HasRetpolineExternalThunk = false;
/// \brief Enumeration of all of the X86 CPUs supported by Clang.
///