uint64_t Offset, SymbolRef &Sym) {
const auto &Relocations = RelocMap[Section];
for (const auto &Relocation : Relocations) {
- uint64_t RelocationOffset;
- if (std::error_code EC = Relocation.getOffset(RelocationOffset))
- return EC;
+ uint64_t RelocationOffset = Relocation.getOffset();
if (RelocationOffset == Offset) {
Sym = *Relocation.getSymbol();
void COFFDumper::printRelocation(const SectionRef &Section,
const RelocationRef &Reloc) {
- uint64_t Offset;
+ uint64_t Offset = Reloc.getOffset();
uint64_t RelocType;
SmallString<32> RelocName;
StringRef SymbolName;
- if (error(Reloc.getOffset(Offset)))
- return;
if (error(Reloc.getType(RelocType)))
return;
if (error(Reloc.getTypeName(RelocName)))