[PATCH] D40199: [dwarfdump] Fix spurious verification errors for DW_AT_location attributes
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 09:41:26 PST 2018
JDevlieghere added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:413
case DW_AT_location: {
- Optional<ArrayRef<uint8_t>> Expr = AttrValue.Value.getAsBlock();
- if (!Expr) {
- ReportError("DIE has invalid DW_AT_location encoding:");
- break;
+ auto VerifyLocation = [&](const void *data, size_t len) {
+ DWARFUnit *U = Die.getDwarfUnit();
----------------
aprantl wrote:
> Why doesn't this just take a StringRef? It looks like all call sites convert StringRefs, too.
No. The call sites have respectively `ArrayRef<uint8t_t>` and `SmallVector<char, 4>` as argument.
https://reviews.llvm.org/D40199
More information about the llvm-commits
mailing list