[PATCH] D28581: Change DWARFDie::getAttributeValue() to DWARFDie::find(), add DWARFDie::findRecurse() and dwarf::toString() helper functions.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 15:20:34 PST 2017
dblaikie added a comment.
I'
================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:147
+Optional<DWARFFormValue>
+DWARFDie::findRecurse(dwarf::Attribute Attr) const {
+ if (!isValid())
----------------
probably 'findRecursively' (open to other ideas on naming 'findIndirectly' seems like it sort of describes things better - but it's not /always/ indirect... meh)
================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:152-157
+ if (auto Die = getAttributeValueAsReferencedDie(DW_AT_abstract_origin))
+ if (auto Value = Die.findRecurse(Attr))
+ return Value;
+ if (auto Die = getAttributeValueAsReferencedDie(DW_AT_specification))
+ if (auto Value = Die.findRecurse(Attr))
+ return Value;
----------------
Do we actually want/need to support the case of walking arbitrarily many abstract_origins and specifications - does that come up/need to be supported? Or is it just one abstract_origin and one specification?
https://reviews.llvm.org/D28581
More information about the llvm-commits
mailing list