git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-10-11 03:36:41 +00:00
Родитель b2cf3573d7
Коммит 00bb283ecd
2 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -627,9 +627,8 @@ QualType ASTContext::getObjcQualifiedInterfaceType(ObjcInterfaceDecl *Decl,
return QualType(QT, 0);
// No Match;
ObjcQualifiedInterfaceType *QType = new ObjcQualifiedInterfaceType(IType);
for (unsigned i = 0; i != NumProtocols; i++)
QType->setProtocols(Protocols[i]);
ObjcQualifiedInterfaceType *QType =
new ObjcQualifiedInterfaceType(IType, Protocols, NumProtocols);
Types.push_back(QType);
ObjcQualifiedInterfaceTypes.InsertNode(QType, InsertPos);
return QualType(QType, 0);

Просмотреть файл

@ -846,12 +846,10 @@ class ObjcQualifiedInterfaceType : public Type, public llvm::FoldingSetNode {
// List is sorted on protocol name. No protocol is enterred more than once.
llvm::SmallVector<ObjcProtocolDecl*, 8> Protocols;
ObjcQualifiedInterfaceType(ObjcInterfaceType *T) :
Type(ObjcQualifiedInterface, QualType()), InterfaceType(T) { }
void setProtocols(ObjcProtocolDecl *pType) {
Protocols.push_back(pType);
}
ObjcQualifiedInterfaceType(ObjcInterfaceType *T,
ObjcProtocolDecl **Protos, unsigned NumP) :
Type(ObjcQualifiedInterface, QualType()), InterfaceType(T),
Protocols(Protos, Protos+NumP) { }
friend class ASTContext; // ASTContext creates these.
public: