aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclarationName.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-23 22:29:11 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-23 22:29:11 +0000
commit319ac896a0fef7365d5589b8021db7e41207fe42 (patch)
treebd75f66465adc68525c08b025898e3da448db3b0 /lib/AST/DeclarationName.cpp
parent97d095f4e53d97cd7a7eca4c69df6e9ee3878098 (diff)
PCH support for all of the predefined Objective-C types, such as id,
SEL, Class, Protocol, CFConstantString, and __objcFastEnumerationState. With this, we can now run the Objective-C methods and properties PCH tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclarationName.cpp')
-rw-r--r--lib/AST/DeclarationName.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp
index 5cc0aab5ee..15461bb99b 100644
--- a/lib/AST/DeclarationName.cpp
+++ b/lib/AST/DeclarationName.cpp
@@ -59,6 +59,11 @@ bool operator<(DeclarationName LHS, DeclarationName RHS) {
} // end namespace clang
DeclarationName::DeclarationName(Selector Sel) {
+ if (!Sel.getAsOpaquePtr()) {
+ Ptr = StoredObjCZeroArgSelector;
+ return;
+ }
+
switch (Sel.getNumArgs()) {
case 0:
Ptr = reinterpret_cast<uintptr_t>(Sel.getAsIdentifierInfo());