[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:57:55 PST 2017


dblaikie added a comment.

My perspective's basically:

Names: find/findRecursively
Non-member: toFoo
Overload toFoo with default parameter versions for cases that seem helpful. (but I'd urge you to change things that are unnecessarily using default values, like this:

  const char *name;
  if ((name = getAttributeValueAsString(linkage_name, nullptr))
    return name;

instead:

  if (auto Name = toString(find(linkage_name)))
    return *Name;

& when you implement findRecursively - looks like DWARFDie::getName could be improved by that.


https://reviews.llvm.org/D28581





More information about the llvm-commits mailing list