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/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index be0e026..e367834 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -154,7 +154,7 @@
if (attrList) // categories don't support attributes.
Diag(Tok, diag::err_objc_no_attributes_on_category);
- DeclTy *CategoryType = Actions.ObjcStartCatInterface(atLoc,
+ DeclTy *CategoryType = Actions.ObjcStartCatInterface(CurScope, atLoc,
nameId, nameLoc,
categoryId, categoryLoc,
&ProtocolRefs[0],
@@ -268,7 +268,8 @@
}
}
/// Insert collected methods declarations into the @interface object.
- Actions.ObjcAddMethodsToClass(interfaceDecl,&allMethods[0],allMethods.size());
+ Actions.ObjcAddMethodsToClass(CurScope,
+ interfaceDecl,&allMethods[0],allMethods.size());
return;
}
@@ -801,7 +802,7 @@
}
}
if (AllIvarDecls.size()) { // Check for {} - no ivars in braces
- Actions.ActOnFields(LBraceLoc, interfaceDecl,
+ Actions.ActOnFields(CurScope, LBraceLoc, interfaceDecl,
&AllIvarDecls[0], AllIvarDecls.size(),
&AllVisibilities[0]);
}
@@ -968,7 +969,7 @@
// @implementation not to have been parsed to completion and ObjcImpDecl
// could be 0.
/// Insert collected methods declarations into the @interface object.
- Actions.ObjcAddMethodsToClass(ObjcImpDecl,
+ Actions.ObjcAddMethodsToClass(CurScope, ObjcImpDecl,
&AllImplMethods[0],AllImplMethods.size());
ObjcImpDecl = 0;
AllImplMethods.clear();