diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-03-16 01:15:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 01:15:50 +0000 |
| commit | 96c501ef7e314fb0d856b409fb6215581b34415e (patch) | |
| tree | b83b266975aa27cc0ca9778b74b2aa357245c2e6 /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | 011b0f5c5ab36db8fe118cf46f19f48d275ff512 (diff) | |
| download | bcm5719-llvm-96c501ef7e314fb0d856b409fb6215581b34415e.tar.gz bcm5719-llvm-96c501ef7e314fb0d856b409fb6215581b34415e.zip | |
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
llvm-svn: 48408
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 4dd84d8555e..d5d658d4ff1 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -98,7 +98,8 @@ Sema::DeclTy *Sema::ActOnStartClassInterface( } } else { - IDecl = new ObjCInterfaceDecl(AtInterfaceLoc, NumProtocols, ClassName); + IDecl = ObjCInterfaceDecl::Create(Context, AtInterfaceLoc, NumProtocols, + ClassName); // Chain & install the interface decl into the identifier. IDecl->setNext(ClassName->getFETokenInfo<ScopedDecl>()); @@ -382,8 +383,8 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation( if (!IDecl) { // Legacy case of @implementation with no corresponding @interface. // Build, chain & install the interface decl into the identifier. - IDecl = new ObjCInterfaceDecl(AtClassImplLoc, 0, ClassName, - false, true); + IDecl = ObjCInterfaceDecl::Create(Context, AtClassImplLoc, 0, ClassName, + false, true); IDecl->setNext(ClassName->getFETokenInfo<ScopedDecl>()); ClassName->setFETokenInfo(IDecl); IDecl->setSuperClass(SDecl); @@ -589,7 +590,8 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, } ObjCInterfaceDecl *IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); if (!IDecl) { // Not already seen? Make a forward decl. - IDecl = new ObjCInterfaceDecl(AtClassLoc, 0, IdentList[i], true); + IDecl = ObjCInterfaceDecl::Create(Context, AtClassLoc, 0, IdentList[i], + true); // Chain & install the interface decl into the identifier. IDecl->setNext(IdentList[i]->getFETokenInfo<ScopedDecl>()); IdentList[i]->setFETokenInfo(IDecl); |

