Cleaned the ObjC AST up.

This commit is contained in:
Erik Verbruggen
2009-08-05 17:14:08 +02:00
parent afd9fd824d
commit ca34b0ca1c
15 changed files with 207 additions and 476 deletions

View File

@@ -636,27 +636,11 @@ ObjCForwardClassDeclaration::~ObjCForwardClassDeclaration()
{}
FullySpecifiedType ObjCForwardClassDeclaration::type() const
{ return FullySpecifiedType(const_cast<ObjCForwardClassDeclaration *>(this)); }
bool ObjCForwardClassDeclaration::isEqualTo(const Type *other) const
{
if (const ObjCForwardClassDeclaration *otherForward = other->asObjCForwardClassDeclarationType()) {
if (name() == otherForward->name())
return true;
else if (name() && otherForward->name())
return name()->isEqualTo(otherForward->name());
return false;
}
return false;
}
{ return FullySpecifiedType(); }
void ObjCForwardClassDeclaration::visitSymbol0(SymbolVisitor *visitor)
{ visitor->visit(this); }
void ObjCForwardClassDeclaration::accept0(TypeVisitor *visitor)
{ visitor->visit(this); }
ObjCForwardProtocolDeclaration::ObjCForwardProtocolDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name):
Symbol(translationUnit, sourceLocation, name)
{
@@ -666,25 +650,9 @@ ObjCForwardProtocolDeclaration::~ObjCForwardProtocolDeclaration()
{}
FullySpecifiedType ObjCForwardProtocolDeclaration::type() const
{ return FullySpecifiedType(const_cast<ObjCForwardProtocolDeclaration *>(this)); }
bool ObjCForwardProtocolDeclaration::isEqualTo(const Type *other) const
{
if (const ObjCForwardProtocolDeclaration *otherForward = other->asObjCForwardProtocolDeclarationType()) {
if (name() == otherForward->name())
return true;
else if (name() && otherForward->name())
return name()->isEqualTo(otherForward->name());
return false;
}
return false;
}
{ return FullySpecifiedType(); }
void ObjCForwardProtocolDeclaration::visitSymbol0(SymbolVisitor *visitor)
{ visitor->visit(this); }
void ObjCForwardProtocolDeclaration::accept0(TypeVisitor *visitor)
{ visitor->visit(this); }
CPLUSPLUS_END_NAMESPACE