[cfe-commits] r42858 - in /cfe/trunk: AST/ASTContext.cpp include/clang/AST/Type.h
Chris Lattner
sabre at nondot.org
Wed Oct 10 20:36:42 PDT 2007
Author: lattner
Date: Wed Oct 10 22:36:41 2007
New Revision: 42858
URL: http://llvm.org/viewvc/llvm-project?rev=42858&view=rev
Log:
slightly simplify interface
Modified:
cfe/trunk/AST/ASTContext.cpp
cfe/trunk/include/clang/AST/Type.h
Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=42858&r1=42857&r2=42858&view=diff
==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Wed Oct 10 22:36:41 2007
@@ -627,9 +627,8 @@
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);
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=42858&r1=42857&r2=42858&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Wed Oct 10 22:36:41 2007
@@ -846,12 +846,10 @@
// 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:
More information about the cfe-commits
mailing list