[PATCH] D95927: DebugInfo/Symbolize: Retrieve filename from the preceding STT_FILE for .symtab symbolization
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 6 14:25:17 PST 2021
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp:226
const auto &Symbols = Type == SymbolRef::ST_Function ? Functions : Objects;
- std::pair<SymbolDesc, StringRef> SD{{Address, UINT64_C(-1)}, StringRef()};
+ SymbolDesc SD{Address, UINT64_C(-1), StringRef(), 0};
auto SymbolIterator = llvm::upper_bound(Symbols, SD);
----------------
Could do the pair removal/rolling the StringRef into the struct as a preliminary patch to focus this patch a bit more. Not absolutely necessary by any means, though.
================
Comment at: llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h:87
bool operator<(const SymbolDesc &RHS) const {
return Addr != RHS.Addr ? Addr < RHS.Addr : Size < RHS.Size;
}
----------------
Separate patch, but this might be more tidily written as `return std::tie(Addr, Size) < std::tie(RHS.Addr, RHS.Size);`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95927/new/
https://reviews.llvm.org/D95927
More information about the llvm-commits
mailing list