diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-11 12:19:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-11 12:19:30 +0000 |
commit | deacbdca554298ccdf636f19c6094a8825ec6b34 (patch) | |
tree | a25e20608fe132a81d48e79b4f1e09dab5936e16 /lib/AST/DeclObjC.cpp | |
parent | 018220c343c103b7dfaa117a7a474c7a7fd6d068 (diff) |
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 0720b203d6..32f9433d9a 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -45,14 +45,6 @@ void ObjCProtocolList::set(ObjCProtocolDecl* const* InList, unsigned Elts, // ObjCInterfaceDecl //===----------------------------------------------------------------------===// -ObjCInterfaceDecl *ObjCInterfaceDecl::getDefinition() { - for (redecl_iterator I = redecls_begin(), E = redecls_end(); I != E; ++I) { - if (I->isDefinition()) - return *I; - } - return 0; -} - /// getIvarDecl - This method looks up an ivar in this ContextDecl. /// ObjCIvarDecl * @@ -440,30 +432,18 @@ ObjCInterfaceDecl *ObjCInterfaceDecl::Create(ASTContext &C, SourceLocation atLoc, IdentifierInfo *Id, SourceLocation ClassLoc, - ObjCInterfaceDecl *PrevDecl, bool ForwardDecl, bool isInternal){ - ObjCInterfaceDecl *D = new (C) ObjCInterfaceDecl(DC, atLoc, Id, ClassLoc, - PrevDecl, ForwardDecl, - isInternal); - C.getObjCInterfaceType(D, PrevDecl); - return D; -} - -ObjCInterfaceDecl *ObjCInterfaceDecl::Create(ASTContext &C, EmptyShell) { - return new (C) ObjCInterfaceDecl(0, SourceLocation(), 0, SourceLocation(), - 0, false, false); + return new (C) ObjCInterfaceDecl(DC, atLoc, Id, ClassLoc, ForwardDecl, + isInternal); } ObjCInterfaceDecl:: ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, - SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl, - bool FD, bool isInternal) + SourceLocation CLoc, bool FD, bool isInternal) : ObjCContainerDecl(ObjCInterface, DC, atLoc, Id), TypeForDecl(0), SuperClass(0), CategoryList(0), ForwardDecl(FD), InternalInterface(isInternal), ClassLoc(CLoc) { - if (PrevDecl) - setPreviousDeclaration(PrevDecl); } ObjCImplementationDecl *ObjCInterfaceDecl::getImplementation() const { |