[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:22:02 PST 2017


dblaikie added a comment.

I'm OK with it - don't mind having both, but looking at the code in LLVM so far, it doesn't seem many of the callers actually want/need the default versions.

The callers of the AsString mostly use a default value of nullptr then test for null anyway - so they could equally test the Optional to produce the same result.

Other callers mostly don't provide default values. I'm not sure the defaulting utilities have enough... utility to bother with, but don't much mind if it seems particularly useful to others.


https://reviews.llvm.org/D28581





More information about the llvm-commits mailing list