aboutsummaryrefslogtreecommitdiff
path: root/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AST/Decl.cpp')
-rw-r--r--AST/Decl.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/AST/Decl.cpp b/AST/Decl.cpp
index 0e6c218f2d..e84532923b 100644
--- a/AST/Decl.cpp
+++ b/AST/Decl.cpp
@@ -164,6 +164,22 @@ FieldDecl* RecordDecl::getMember(IdentifierInfo *name) {
return 0;
}
+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;
+ }
+}
+
+ObjcMethodDecl::~ObjcMethodDecl() {
+ delete[] ParamInfo;
+}
+
/// addObjcMethods - Insert instance and methods declarations into
/// ObjcInterfaceDecl's InsMethods and ClsMethods fields.
///