diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-20 06:23:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-20 06:23:21 +0000 |
commit | 2073216a1075767b5d25c23d1462b7034686d94d (patch) | |
tree | 90ec927e94b8dfede30abfc3d5e97f4cd2203db3 /lib/AST/DeclObjC.cpp | |
parent | e881483a3bc22ffad62367501aa09ad8508fe363 (diff) |
switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 629dcca678..1651df9141 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -42,8 +42,7 @@ void ObjCMethodDecl::Destroy(ASTContext& C) { for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I) if (*I) (*I)->Destroy(C); - delete [] ParamInfo; - ParamInfo = 0; + ParamInfo.clear(); Decl::Destroy(C); } @@ -241,18 +240,6 @@ void ObjCMethodDecl::createImplicitParams(ASTContext &Context, Context.getObjCSelType()); } -void ObjCMethodDecl::setMethodParams(ParmVarDecl **NewParamInfo, - unsigned NumParams) { - assert(ParamInfo == 0 && "Already has param info!"); - - // Zero params -> null pointer. - if (NumParams) { - ParamInfo = new ParmVarDecl*[NumParams]; - memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams); - NumMethodParams = NumParams; - } -} - /// FindCategoryDeclaration - Finds category declaration in the list of /// categories for this class and returns it. Name of the category is passed /// in 'CategoryId'. If category not found, return 0; |