diff options
author | Eric Christopher <echristo@apple.com> | 2012-04-03 00:44:15 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-04-03 00:44:15 +0000 |
commit | b7e821a6aa9abdfe6c7cf2bccae68e757089df8a (patch) | |
tree | f3edae2715f06d82669fa4fdb11842a6e6e54f72 /clang/lib/CodeGen/CGObjC.cpp | |
parent | 34164196af54ffa242e0c92af1031af079709439 (diff) | |
download | bcm5719-llvm-b7e821a6aa9abdfe6c7cf2bccae68e757089df8a.tar.gz bcm5719-llvm-b7e821a6aa9abdfe6c7cf2bccae68e757089df8a.zip |
Change location information for synthesized properties to be at the
property file/line rather than the @synthesize file/line. Avoids
some nasty confusing-ness with conflating the file from the scope
and the line from the original declaration. Use the current scope
location as a separate parameter so that we can match it up
better in the line table with the beginning of the scope.
Update a couple of testcases accordingly since I had to change
that we actually use the passed in location in EmitFunctionStart
and for the new metadata parameter and add a new testcase to
make sure we've got the right line numbers for synthesized
properties.
Part of rdar://11026482
llvm-svn: 153917
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index b4fc6e0ffa4..b3460aef2d9 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -708,7 +708,7 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, const ObjCPropertyDecl *PD = PID->getPropertyDecl(); ObjCMethodDecl *OMD = PD->getGetterMethodDecl(); assert(OMD && "Invalid call to generate getter (empty method)"); - StartObjCMethod(OMD, IMP->getClassInterface(), PID->getLocStart()); + StartObjCMethod(OMD, IMP->getClassInterface(), OMD->getLocStart()); generateObjCGetterBody(IMP, PID, AtomicHelperFn); @@ -1216,7 +1216,7 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP, const ObjCPropertyDecl *PD = PID->getPropertyDecl(); ObjCMethodDecl *OMD = PD->getSetterMethodDecl(); assert(OMD && "Invalid call to generate setter (empty method)"); - StartObjCMethod(OMD, IMP->getClassInterface(), PID->getLocStart()); + StartObjCMethod(OMD, IMP->getClassInterface(), OMD->getLocStart()); generateObjCSetterBody(IMP, PID, AtomicHelperFn); |