Name of addLayoutToClass is confusing as no layout calculation

is done. Layout is calculated lazily at code gen type.
This patch changes the name.

llvm-svn: 61054
This commit is contained in:
Fariborz Jahanian 2008-12-15 21:58:08 +00:00
parent 590b10dba2
commit 48ee658562
5 changed files with 6 additions and 6 deletions

View File

@ -386,7 +386,7 @@ public:
SourceLocation RBracLoc);
FieldDecl *lookupFieldDeclForIvar(ASTContext &Context,
const ObjCIvarDecl *ivar);
void addLayoutToClass(ASTContext &Context);
void addRecordToClass(ASTContext &Context);
void addMethods(ObjCMethodDecl **insMethods, unsigned numInsMembers,
ObjCMethodDecl **clsMethods, unsigned numClsMembers,

View File

@ -377,10 +377,10 @@ FieldDecl *ObjCInterfaceDecl::lookupFieldDeclForIvar(ASTContext &Context,
return MemberDecl;
}
/// addLayoutToClass - produces layout info. for the class for its
/// addRecordToClass - produces record info. for the class for its
/// ivars and all those inherited.
///
void ObjCInterfaceDecl::addLayoutToClass(ASTContext &Context)
void ObjCInterfaceDecl::addRecordToClass(ASTContext &Context)
{
std::vector<FieldDecl*> RecFields;
CollectObjCIvars(RecFields);

View File

@ -277,7 +277,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
if(!RD) {
// Sometimes, class type is being directly generated in code gen for
// built-in class types.
ID->addLayoutToClass(Context);
ID->addRecordToClass(Context);
RD = ID->getRecordForDecl();
}
return ConvertTagDeclType(cast<TagDecl>(RD));

View File

@ -2968,7 +2968,7 @@ void Sema::ActOnFields(Scope* S,
ObjCIvarDecl **ClsFields = reinterpret_cast<ObjCIvarDecl**>(&RecFields[0]);
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(EnclosingDecl)) {
ID->addInstanceVariablesToClass(ClsFields, RecFields.size(), RBrac);
ID->addLayoutToClass(Context);
ID->addRecordToClass(Context);
}
else if (ObjCImplementationDecl *IMPDecl =
dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {

View File

@ -588,7 +588,7 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl,
/// Add implementations's ivar to the synthesize class's ivar list.
if (IDecl->ImplicitInterfaceDecl()) {
IDecl->addInstanceVariablesToClass(ivars, numIvars, RBrace);
IDecl->addLayoutToClass(Context);
IDecl->addRecordToClass(Context);
return;
}
// If implementation has empty ivar list, just return.