diff options
author | Steve Naroff <snaroff@apple.com> | 2007-10-29 21:38:07 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-10-29 21:38:07 +0000 |
commit | 60fcceeedbfc8b4a99cb942e2bc5aeb9e2f92a1f (patch) | |
tree | 384374410bd1f209453bf9d7de8ed5bfd6b86cf1 /AST/Decl.cpp | |
parent | 771fe16a5e5cbd80902f44b1286985654ffec751 (diff) |
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/Decl.cpp')
-rw-r--r-- | AST/Decl.cpp | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/AST/Decl.cpp b/AST/Decl.cpp index 30ca5e6e1b..804e9ccabf 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -293,13 +293,15 @@ ObjcMethodDecl::~ObjcMethodDecl() { /// ObjcAddInstanceVariablesToClass - Inserts instance variables /// into ObjcInterfaceDecl's fields. /// -void ObjcInterfaceDecl::ObjcAddInstanceVariablesToClass(ObjcIvarDecl **ivars, - unsigned numIvars) { +void ObjcInterfaceDecl::addInstanceVariablesToClass(ObjcIvarDecl **ivars, + unsigned numIvars, + SourceLocation RB) { NumIvars = numIvars; if (numIvars) { Ivars = new ObjcIvarDecl*[numIvars]; memcpy(Ivars, ivars, numIvars*sizeof(ObjcIvarDecl*)); } + RBracLoc = RB; } /// ObjcAddInstanceVariablesToClassImpl - Checks for correctness of Instance @@ -315,13 +317,14 @@ void ObjcImplementationDecl::ObjcAddInstanceVariablesToClassImpl( } } -/// addObjcMethods - Insert instance and methods declarations into +/// addMethods - Insert instance and methods declarations into /// ObjcInterfaceDecl's InsMethods and ClsMethods fields. /// -void ObjcInterfaceDecl::ObjcAddMethods(ObjcMethodDecl **insMethods, - unsigned numInsMembers, - ObjcMethodDecl **clsMethods, - unsigned numClsMembers) { +void ObjcInterfaceDecl::addMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers, + SourceLocation endLoc) { NumInstanceMethods = numInsMembers; if (numInsMembers) { InstanceMethods = new ObjcMethodDecl*[numInsMembers]; @@ -332,15 +335,17 @@ void ObjcInterfaceDecl::ObjcAddMethods(ObjcMethodDecl **insMethods, ClassMethods = new ObjcMethodDecl*[numClsMembers]; memcpy(ClassMethods, clsMethods, numClsMembers*sizeof(ObjcMethodDecl*)); } + EndLoc = endLoc; } -/// ObjcAddProtoMethods - Insert instance and methods declarations into +/// addMethods - Insert instance and methods declarations into /// ObjcProtocolDecl's ProtoInsMethods and ProtoClsMethods fields. /// -void ObjcProtocolDecl::ObjcAddProtoMethods(ObjcMethodDecl **insMethods, - unsigned numInsMembers, - ObjcMethodDecl **clsMethods, - unsigned numClsMembers) { +void ObjcProtocolDecl::addMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers, + SourceLocation AtEndLoc) { NumInstanceMethods = numInsMembers; if (numInsMembers) { InstanceMethods = new ObjcMethodDecl*[numInsMembers]; @@ -353,13 +358,14 @@ void ObjcProtocolDecl::ObjcAddProtoMethods(ObjcMethodDecl **insMethods, } } -/// ObjcAddCat - Insert instance and methods declarations into +/// addMethods - Insert instance and methods declarations into /// ObjcCategoryDecl's CatInsMethods and CatClsMethods fields. /// -void ObjcCategoryDecl::ObjcAddCatMethods(ObjcMethodDecl **insMethods, - unsigned numInsMembers, - ObjcMethodDecl **clsMethods, - unsigned numClsMembers) { +void ObjcCategoryDecl::addMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers, + SourceLocation AtEndLoc) { NumInstanceMethods = numInsMembers; if (numInsMembers) { InstanceMethods = new ObjcMethodDecl*[numInsMembers]; @@ -372,13 +378,14 @@ void ObjcCategoryDecl::ObjcAddCatMethods(ObjcMethodDecl **insMethods, } } -/// ObjcAddCatImplMethods - Insert instance and methods declarations into +/// addMethods - Insert instance and methods declarations into /// ObjcCategoryImplDecl's CatInsMethods and CatClsMethods fields. /// -void ObjcCategoryImplDecl::ObjcAddCatImplMethods(ObjcMethodDecl **insMethods, - unsigned numInsMembers, - ObjcMethodDecl **clsMethods, - unsigned numClsMembers) { +void ObjcCategoryImplDecl::addMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers, + SourceLocation AtEndLoc) { NumInstanceMethods = numInsMembers; if (numInsMembers) { InstanceMethods = new ObjcMethodDecl*[numInsMembers]; @@ -394,10 +401,11 @@ void ObjcCategoryImplDecl::ObjcAddCatImplMethods(ObjcMethodDecl **insMethods, /// ObjcAddImplMethods - Insert instance and methods declarations into /// ObjcImplementationDecl's InsMethods and ClsMethods fields. /// -void ObjcImplementationDecl::ObjcAddImplMethods(ObjcMethodDecl **insMethods, - unsigned numInsMembers, - ObjcMethodDecl **clsMethods, - unsigned numClsMembers) { +void ObjcImplementationDecl::addMethods(ObjcMethodDecl **insMethods, + unsigned numInsMembers, + ObjcMethodDecl **clsMethods, + unsigned numClsMembers, + SourceLocation AtEndLoc) { NumInstanceMethods = numInsMembers; if (numInsMembers) { InstanceMethods = new ObjcMethodDecl*[numInsMembers]; |