Pass from the parser the locations of selector identifiers when creating

objc method decls.

They are not stored in the AST yet.

llvm-svn: 140984
This commit is contained in:
Argyrios Kyrtzidis
2011-10-03 06:36:36 +00:00
parent 3849394b81
commit dfd6570643
9 changed files with 21 additions and 10 deletions

View File

@@ -2134,6 +2134,7 @@ void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
Selector cxxSelector = getContext().Selectors.getSelector(0, &II);
ObjCMethodDecl *DTORMethod =
ObjCMethodDecl::Create(getContext(), D->getLocation(), D->getLocation(),
ArrayRef<SourceLocation>(),
cxxSelector, getContext().VoidTy, 0, D,
/*isInstance=*/true, /*isVariadic=*/false,
/*isSynthesized=*/true, /*isImplicitlyDeclared=*/true,
@@ -2153,7 +2154,9 @@ void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
// The constructor returns 'self'.
ObjCMethodDecl *CTORMethod = ObjCMethodDecl::Create(getContext(),
D->getLocation(),
D->getLocation(), cxxSelector,
D->getLocation(),
ArrayRef<SourceLocation>(),
cxxSelector,
getContext().getObjCIdType(), 0,
D, /*isInstance=*/true,
/*isVariadic=*/false,