summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/TargetInfo.h
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-07-19 21:50:08 +0000
committerErich Keane <erich.keane@intel.com>2017-07-19 21:50:08 +0000
commitcaf7e5a0b51f04b9594f78a31fead6937247acd1 (patch)
tree077cd631a50eebf865864a047cae903068735be8 /include/clang/Basic/TargetInfo.h
parent8ccbaa6d612eac92d7ec4d0deff876d36d9510fd (diff)
Add isValidCPUName and isValidFeature to TargetInfo
These two functions are really useful for implementations of attributes (including attribute-target), so add the functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r--include/clang/Basic/TargetInfo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index d1a9ea85db..7bb910f266 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -869,6 +869,11 @@ public:
return false;
}
+ /// brief Determine whether this TargetInfo supports the given CPU name.
+ virtual bool isValidCPUName(StringRef Name) const {
+ return false;
+ }
+
/// \brief Use the specified ABI.
///
/// \return False on error (invalid ABI name).
@@ -891,6 +896,11 @@ public:
Features[Name] = Enabled;
}
+ /// \brief Determine whether this TargetInfo supports the given feature.
+ virtual bool isValidFeatureName(StringRef Feature) const {
+ return false;
+ }
+
/// \brief Perform initialization based on the user configured
/// set of features (e.g., +sse4).
///