summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/AttributeList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/AttributeList.cpp')
-rw-r--r--clang/lib/Sema/AttributeList.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp
index c079c30382c..58a3e23c1b0 100644
--- a/clang/lib/Sema/AttributeList.cpp
+++ b/clang/lib/Sema/AttributeList.cpp
@@ -156,10 +156,13 @@ struct ParsedAttrInfo {
unsigned NumArgs : 4;
unsigned OptArgs : 4;
unsigned HasCustomParsing : 1;
+ unsigned IsTargetSpecific : 1;
+ unsigned IsType : 1;
bool (*DiagAppertainsToDecl)(Sema &S, const AttributeList &Attr,
const Decl *);
bool (*DiagLangOpts)(Sema &S, const AttributeList &Attr);
+ bool (*ExistsInTarget)(llvm::Triple T);
};
namespace {
@@ -189,3 +192,15 @@ bool AttributeList::diagnoseAppertainsTo(Sema &S, const Decl *D) const {
bool AttributeList::diagnoseLangOpts(Sema &S) const {
return getInfo(*this).DiagLangOpts(S, *this);
}
+
+bool AttributeList::isTargetSpecificAttr() const {
+ return getInfo(*this).IsTargetSpecific;
+}
+
+bool AttributeList::isTypeAttr() const {
+ return getInfo(*this).IsType;
+}
+
+bool AttributeList::existsInTarget(llvm::Triple T) const {
+ return getInfo(*this).ExistsInTarget(T);
+}
OpenPOWER on IntegriCloud