aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-16 01:15:50 +0000
committerChris Lattner <sabre@nondot.org>2008-03-16 01:15:50 +0000
commit0e77ba0bf769e2e5a4a93c079f241b02aeb3ef93 (patch)
tree424cde040af9365d3e40adffb13e8213fe1cea1e /lib/Sema/SemaDeclObjC.cpp
parent58cce3b0dcbdcc95b7e713795834b4cb2c8a008a (diff)
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 4dd84d8555..d5d658d4ff 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/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);