[PATCH] D66121: Debug Info: Nest Objective-C property function decls inside their container.
Adrian Prantl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 29 17:04:33 PDT 2019
aprantl updated this revision to Diff 218000.
aprantl added a comment.
Herald added a subscriber: arphaman.
Here is a work-in-progress alternative patch that attacks the problem by changing the AST generation to have an ObjCMethodDecl for the property accessors inside the implementation as suggested by @rjmccall.
The patch passes all clang-codegen-* tests, with a few problems in c-index-test outstanding that I'll work through.
Let me know if you have any feedback on this approach! I'd be curious if there is a more elegant way of doing this: The code that I needed to add to `ObjCMethodDecl::getNextRedeclarationImpl()` is a bit odd (see the example in the FIXME comment there). It's also weird that Objective-C methods can have exactly one redeclaration which forces me to set up a chain of redeclarations in Sema::ActOnPropertyImplDecl() instead of having several implementations point to the same abstract property declaration, but that seems to work.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66121/new/
https://reviews.llvm.org/D66121
Files:
clang/include/clang/AST/DeclObjC.h
clang/lib/AST/DeclObjC.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h
clang/lib/CodeGen/CGObjC.cpp
clang/lib/CodeGen/CGObjCGNU.cpp
clang/lib/CodeGen/CGObjCMac.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
clang/lib/Frontend/Rewrite/RewriteObjC.cpp
clang/lib/Index/IndexDecl.cpp
clang/lib/Sema/SemaObjCProperty.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/CodeGenObjC/debug-info-objc-property-dwarf5.m
clang/test/CodeGenObjC/debug-info-synthesis.m
clang/test/CodeGenObjC/debug-property-synth.m
clang/test/CodeGenObjC/debuginfo-properties.m
clang/test/CodeGenObjC/instance-method-metadata.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66121.218000.patch
Type: text/x-patch
Size: 31046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190830/2b8e1ce5/attachment-0001.bin>
More information about the cfe-commits
mailing list