aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/AttributeList.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-07-31 22:40:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-07-31 22:40:48 +0000
commit3068ae0feb5d477477f45045f7ec9d0414fe57f3 (patch)
tree88d8c041f2e7178065edfbef62b9febfc0304d75 /lib/Parse/AttributeList.cpp
parent22bda887aacd0e591978541a799aa43835652ec9 (diff)
Support __attribute__(({con,de}structor)) in Parse & Sema
- Including possible priority argument - In other news, the attribute parsing code really needs a cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/AttributeList.cpp')
-rw-r--r--lib/Parse/AttributeList.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp
index 0eaba66514..b120f7eda8 100644
--- a/lib/Parse/AttributeList.cpp
+++ b/lib/Parse/AttributeList.cpp
@@ -50,6 +50,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
Len -= 4;
}
+ // FIXME: Hand generating this is neither smart nor efficient.
switch (Len) {
case 4:
if (!memcmp(Str, "weak", 4)) return AT_weak;
@@ -85,9 +86,11 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
case 10:
if (!memcmp(Str, "deprecated", 10)) return AT_deprecated;
if (!memcmp(Str, "visibility", 10)) return AT_visibility;
+ if (!memcmp(Str, "destructor", 10)) return AT_destructor;
break;
case 11:
if (!memcmp(Str, "vector_size", 11)) return AT_vector_size;
+ if (!memcmp(Str, "constructor", 11)) return AT_constructor;
break;
case 13:
if (!memcmp(Str, "address_space", 13)) return AT_address_space;