[PATCH] D158980: [DebugInfo][NFC] Move ObjC Selector name handling to lib DebugInfo
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 15:15:12 PDT 2023
aprantl added inline comments.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:759
+ std::optional<StringRef> ClassNameNoCategory;
+ // For "-[A(Category) method:]", this would be "A method:"
+ std::optional<std::string> MethodNameNoCategory;
----------------
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:752
+struct ObjCSelectorNames {
+ StringRef Selector;
----------------
fdeazeve wrote:
> aprantl wrote:
> > Why plural?
> Because there are 4 such names. But to be honest, I'm not sure I understand what an objective C selector is; maybe just "ObjectiveCNames" would be better?
An ObjC selector is basically the name of a method: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocSelectors.html
When you send a message (~ call a method) in ObjC, you pass the selctor to objc_msgSend and it will look up the function behind that selector and invoke it. So if it's all selector names, let's keep it that way; it would be the right terminology.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158980/new/
https://reviews.llvm.org/D158980
More information about the llvm-commits
mailing list