[Lldb-commits] [PATCH] D47470: AppleDWARFIndex: Get function method-ness directly from debug info
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 29 03:58:35 PDT 2018
labath created this revision.
labath added reviewers: clayborg, JDevlieghere.
Herald added a subscriber: aprantl.
When searching for methods only, we need to do extra work to make sure
the functions we get from the apple tables are indeed methods.
Previously we were resolving the DIE into a SymbolContext and then
checked whether the enclosing CompilerDeclContext is a
class (or struct, or union).
This patch changes that to operate on the debug info directly. This
should be:
- simpler
- faster
- more consistent with the ManualDWARFIndex (which does the same check, only at indexing time).
What we lose this ways is for the language plugin to have a say in what
it considers to be a "class", but that's probably more flexibility than
we need (and if we really wanted to do that in the future, we could
implement a more direct way to consult the plugin about this).
This also fixes the find-method-local-struct test, which was failing
because we were not able to construct a CompilerDeclContext for a local
struct correctly.
As a drive-by, I rename the DWARFDIE's IsStructClassOrUnion method to
match the name on the CompilerDeclContext class.
https://reviews.llvm.org/D47470
Files:
lit/SymbolFile/DWARF/find-method-local-struct.cpp
source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
source/Plugins/SymbolFile/DWARF/DWARFDIE.h
source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47470.148879.patch
Type: text/x-patch
Size: 5993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180529/8e7b9916/attachment.bin>
More information about the lldb-commits
mailing list