diff options
author | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-01-09 08:53:59 +0000 |
---|---|---|
committer | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-01-09 08:53:59 +0000 |
commit | 1955fd01bdd56c691bb71410251faaa7feb66f81 (patch) | |
tree | b1bcb89c4431b94f31a359abd67c3cc278965351 /include/clang/Basic/TargetInfo.h | |
parent | 799f997a14464b3d54eeeb03e9ee5f9633a07eb0 (diff) |
Added Control Flow Protection Flag
Cf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc.
For example in X86 this flag will be used to instrument Indirect Branch Tracking instructions.
Differential Revision: https://reviews.llvm.org/D40478
Change-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index fad923c272..0fc622348c 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -1051,6 +1051,18 @@ public: return false; } + /// Check if the target supports CFProtection branch. + virtual bool + checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const { + return false; + } + + /// Check if the target supports CFProtection branch. + virtual bool + checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const { + return false; + } + /// \brief Whether target allows to overalign ABI-specified preferred alignment virtual bool allowsLargerPreferedTypeAlignment() const { return true; } |