llvm_unreachable("null symbol table pointer!");
}
- iterator_range<const coff_relocation *>
- getRelocations(const coff_section *Sec) const;
+ ArrayRef<coff_relocation> getRelocations(const coff_section *Sec) const;
std::error_code getSectionName(const coff_section *Sec, StringRef &Res) const;
uint64_t getSectionSize(const coff_section *Sec) const;
return toRel(Reloc.getRawDataRefImpl());
}
-iterator_range<const coff_relocation *>
+ArrayRef<coff_relocation>
COFFObjectFile::getRelocations(const coff_section *Sec) const {
- const coff_relocation *I = getFirstReloc(Sec, Data, base());
- const coff_relocation *E = I;
- if (I)
- E += getNumberOfRelocations(Sec, Data, base());
- return make_range(I, E);
+ return {getFirstReloc(Sec, Data, base()),
+ getNumberOfRelocations(Sec, Data, base())};
}
#define LLVM_COFF_SWITCH_RELOC_TYPE_NAME(reloc_type) \