[PATCH] D26052: Modify DWARFFormValue to remember the DWARFUnit that it was decoded with.
Frederic Riss via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 17:24:11 PDT 2016
friss added a comment.
Looks globally good. Some nits:
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFUnit.h:198-201
+ uint8_t getRefAddrByteSize() const {
+ // FIXME: Support DWARF64.
+ return (Version == 2) ? AddrSize : 4;
+ }
----------------
llvm-dsymutil has a helper that does the same computation. Please add this helper and remove dsymutil's one in a preliminary commit.
================
Comment at: tools/dsymutil/DwarfLinker.cpp:1487-1490
const DWARFFormValue &RefValue, const DWARFUnit &Unit,
const DWARFDebugInfoEntryMinimal &DIE, CompileUnit *&RefCU) {
assert(RefValue.isFormClass(DWARFFormValue::FC_Reference));
+ uint64_t RefOffset = *RefValue.getAsReference();
----------------
If the FormValue holds the Unit, let's stop passing it around in small helpers like this. RefValue->getUnit() can be used below.
================
Comment at: tools/dsymutil/DwarfLinker.cpp:2358
const DWARFFormValue &Val,
const DWARFUnit &U) {
// Switch everything to out of line strings.
----------------
U is just unused here AFAICS, just remove it.
Repository:
rL LLVM
https://reviews.llvm.org/D26052
More information about the llvm-commits
mailing list