diff options
| author | Steve Naroff <snaroff@apple.com> | 2008-04-02 18:30:49 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2008-04-02 18:30:49 +0000 |
| commit | 778927532d9624a5dd7c7b552f949d3d61aa3729 (patch) | |
| tree | 5d7845053b0b32874a77389790ee48fded19b4c2 /clang/lib/Sema/Sema.h | |
| parent | 586740f4011e0c2015cdfbb2c25ee13caca24bb8 (diff) | |
| download | bcm5719-llvm-778927532d9624a5dd7c7b552f949d3d61aa3729.tar.gz bcm5719-llvm-778927532d9624a5dd7c7b552f949d3d61aa3729.zip | |
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.
I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)
llvm-svn: 49107
Diffstat (limited to 'clang/lib/Sema/Sema.h')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index e98d9b59a7f..d2ad5c5f754 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -94,7 +94,14 @@ class Sema : public Action { /// with @protocol keyword, so that we can emit errors on duplicates and /// find the declarations when needed. llvm::DenseMap<IdentifierInfo*, ObjCProtocolDecl*> ObjCProtocols; - + + /// ObjCInterfaceDecls - Keep track of all class declarations declared + /// with @interface, so that we can emit errors on duplicates and + /// find the declarations when needed. + typedef llvm::DenseMap<const IdentifierInfo*, + ObjCInterfaceDecl*> ObjCInterfaceDeclsTy; + ObjCInterfaceDeclsTy ObjCInterfaceDecls; + /// ObjCAliasDecls - Keep track of all class declarations declared /// with @compatibility_alias, so that we can emit errors on duplicates and /// find the declarations when needed. This construct is ancient and will @@ -102,7 +109,7 @@ class Sema : public Action { typedef llvm::DenseMap<const IdentifierInfo*, ObjCCompatibleAliasDecl*> ObjCAliasTy; ObjCAliasTy ObjCAliasDecls; - + // Enum values used by KnownFunctionIDs (see below). enum { id_printf, |

