Added method to check if a scope is an ObjCClass scope.

This commit is contained in:
Erik Verbruggen
2009-12-18 16:58:14 +01:00
parent 19beb9c84f
commit 918856cac3
2 changed files with 10 additions and 0 deletions

View File

@@ -172,6 +172,13 @@ bool Scope::isPrototypeScope() const
return false;
}
bool Scope::isObjCClassScope() const
{
if (_owner)
return _owner->isObjCClass();
return false;
}
bool Scope::isFunctionScope() const
{
Function *f = 0;

View File

@@ -111,6 +111,9 @@ public:
/// Returns true if this scope's owner is a Prototype Symbol.
bool isPrototypeScope() const;
/// Returns true if this scope's owner is an ObjCClass Symbol.
bool isObjCClassScope() const;
/// Adds a Symbol to this Scope.
void enterSymbol(Symbol *symbol);