[PATCH] D47152: [DebugInfo] Use absolute addresses in location lists
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 11:08:55 PDT 2018
dblaikie added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDie.cpp:111-115
+ uint64_t BaseAddr = 0;
+ if (Optional<BaseAddress> BA = U->getBaseAddress())
+ BaseAddr = BA->Address;
+ LL->dump(OS, Ctx.isLittleEndian(), Obj.getAddressSize(), MRI, BaseAddr,
+ Indent);
----------------
JDevlieghere wrote:
> dblaikie wrote:
> > Might be able to replace "BaseAddr" with "U->getBaseAddress().getValueOr(0)" ?
> I think that wouldn't work here because the Optional wraps the struct rather than the unsigned?
Ah, sure enough. Could do "getValueOr(BaseAddress())" but that might be going further than is useful. Up to you.
Repository:
rL LLVM
https://reviews.llvm.org/D47152
More information about the llvm-commits
mailing list