[Lldb-commits] [PATCH] D32375: [DWARF] Fix lookup in the abstract origins of inlined blocks/functions
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 24 12:09:42 PDT 2017
jingham added a comment.
Except for the comment about FindFirstChildWithAbstractOrigin, this seems fine.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3723-3742
+static DWARFDIE FindAnyChildWithAbstractOrigin(const DWARFDIE &context) {
+ for (DWARFDIE candidate = context.GetFirstChild(); candidate.IsValid();
+ candidate = candidate.GetSibling()) {
+ if (candidate.GetReferencedDIE(DW_AT_abstract_origin)) {
+ return candidate;
+ }
+ }
----------------
The second of these functions seems dangerous since it doesn't check that `block` is contained in `function`. As such, I'm not sure it's worth breaking it out into a separate function rather than inlining it in GetDeclContextForBlock, where that relationship is already known.
Repository:
rL LLVM
https://reviews.llvm.org/D32375
More information about the lldb-commits
mailing list