diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-23 23:18:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-23 23:18:26 +0000 |
commit | 6e378de1aebdfeb44f2a7677ed207b32b3a41fbf (patch) | |
tree | ebe6d9f2667badf85db5bc196865c133be715138 /lib/Sema/Sema.h | |
parent | 99612939d02d99a6ef3ff037aa14c4277e9c43ce (diff) |
Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls in
their own namespace (IDNS_Protocol) and use the normal name-lookup
routines to find them. Aside from the simplification this provides
(one less DenseMap!), it means that protocols will be lazily
deserialized from PCH files.
Make the code size of the selector table block match the code size of
the type and decl blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.h')
-rw-r--r-- | lib/Sema/Sema.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 5a53374033..8cf2af0577 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -176,11 +176,6 @@ public: /// we can check for duplicates and find local method declarations. llvm::SmallVector<ObjCCategoryImplDecl*, 8> ObjCCategoryImpls; - /// ObjCProtocols - Keep track of all protocol declarations declared - /// with @protocol keyword, so that we can emit errors on duplicates and - /// find the declarations when needed. - llvm::DenseMap<IdentifierInfo*, ObjCProtocolDecl*> ObjCProtocols; - /// ObjCInterfaceDecls - Keep track of all class declarations declared /// with @interface, so that we can emit errors on duplicates and /// find the declarations when needed. @@ -769,11 +764,13 @@ public: /// namespace alias definition, ignoring non-namespace names (C++ /// [basic.lookup.udir]p1). LookupNamespaceName, - // Look up an ordinary name that is going to be redeclared as a - // name with linkage. This lookup ignores any declarations that - // are outside of the current scope unless they have linkage. See - // C99 6.2.2p4-5 and C++ [basic.link]p6. - LookupRedeclarationWithLinkage + /// Look up an ordinary name that is going to be redeclared as a + /// name with linkage. This lookup ignores any declarations that + /// are outside of the current scope unless they have linkage. See + /// C99 6.2.2p4-5 and C++ [basic.link]p6. + LookupRedeclarationWithLinkage, + /// Look up the name of an Objective-C protocol. + LookupProtocolName }; /// @brief Represents the results of name lookup. @@ -1025,6 +1022,7 @@ public: case Sema::LookupTagName: case Sema::LookupMemberName: case Sema::LookupRedeclarationWithLinkage: // FIXME: check linkage, scoping + case Sema::LookupProtocolName: return D->isInIdentifierNamespace(IDNS); case Sema::LookupOperatorName: @@ -1058,6 +1056,8 @@ public: bool AllowBuiltinCreation = true, SourceLocation Loc = SourceLocation()); + ObjCProtocolDecl *LookupProtocol(IdentifierInfo *II); + void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, FunctionSet &Functions); |