Removed use of hash table for class decls and do a name look up directly.
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42463 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.h b/Sema/Sema.h
index d9a1cc4..2c753f3 100644
--- a/Sema/Sema.h
+++ b/Sema/Sema.h
@@ -46,6 +46,7 @@
class SwitchStmt;
class OCUVectorType;
class TypedefDecl;
+ class ObjcInterfaceDecl;
/// Sema - This implements semantic analysis and AST building for C.
class Sema : public Action {
@@ -121,7 +122,7 @@
bool Diag(SourceLocation Loc, unsigned DiagID,
const std::string &Msg1, const std::string &Msg2,
SourceRange R1, SourceRange R2);
-
+
virtual void DeleteExpr(ExprTy *E);
virtual void DeleteStmt(StmtTy *S);
@@ -157,7 +158,8 @@
Declarator &D, ExprTy *BitfieldWidth);
// This is used for both record definitions and ObjC interface declarations.
- virtual void ActOnFields(SourceLocation RecLoc, DeclTy *TagDecl,
+ virtual void ActOnFields(Scope* S,
+ SourceLocation RecLoc, DeclTy *TagDecl,
DeclTy **Fields, unsigned NumFields,
tok::ObjCKeywordKind *visibility = 0);
virtual DeclTy *ActOnEnumConstant(Scope *S, DeclTy *EnumDecl,
@@ -181,6 +183,8 @@
Scope *FnBodyScope);
ScopedDecl *LookupScopedDecl(IdentifierInfo *II, unsigned NSI,
SourceLocation IdLoc, Scope *S);
+ ObjcInterfaceDecl *getObjCInterfaceDecl(Scope *S,
+ IdentifierInfo *Id, SourceLocation IdLoc);
ScopedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S);
ScopedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
Scope *S);
@@ -364,7 +368,8 @@
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs);
- virtual DeclTy *ObjcStartCatInterface(SourceLocation AtInterfaceLoc,
+ virtual DeclTy *ObjcStartCatInterface(Scope* S,
+ SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs);
@@ -384,7 +389,7 @@
IdentifierInfo **IdentList,
unsigned NumElts);
- virtual void ObjcAddMethodsToClass(DeclTy *ClassDecl,
+ virtual void ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
DeclTy **allMethods, unsigned allNum);
virtual void ActOnImpleIvarVsClassIvars(DeclTy *ClassDecl,