diff options
author | John McCall <rjmccall@apple.com> | 2011-06-15 23:02:42 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-06-15 23:02:42 +0000 |
commit | 31168b077c3687bb79985102b08718cd77db353d (patch) | |
tree | 489434d90661950c25716a5db40be446d933c95c /clang/lib/Basic/IdentifierTable.cpp | |
parent | ce45f88e451387c46bfd6b53c75c7fa72b730ba1 (diff) | |
download | bcm5719-llvm-31168b077c3687bb79985102b08718cd77db353d.tar.gz bcm5719-llvm-31168b077c3687bb79985102b08718cd77db353d.zip |
Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 4711faa1a51..109761c9dc9 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -17,6 +17,7 @@ #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringSwitch.h" #include "llvm/Support/raw_ostream.h" #include <cstdio> @@ -92,7 +93,8 @@ namespace { KEYBORLAND = 0x100, KEYOPENCL = 0x200, KEYC1X = 0x400, - KEYALL = 0x7ff + KEYARC = 0x800, + KEYALL = 0x0fff }; } @@ -120,7 +122,8 @@ static void AddKeyword(llvm::StringRef Keyword, else if (LangOpts.OpenCL && (Flags & KEYOPENCL)) AddResult = 2; else if (!LangOpts.CPlusPlus && (Flags & KEYNOCXX)) AddResult = 2; else if (LangOpts.C1X && (Flags & KEYC1X)) AddResult = 2; - + else if (LangOpts.ObjCAutoRefCount && (Flags & KEYARC)) AddResult = 2; + // Don't add this keyword if disabled in this language. if (AddResult == 0) return; |