mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Don't return error_code from function that never fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -967,15 +967,9 @@ std::error_code COFFObjectFile::getRelocationAddress(DataRefImpl Rel,
|
||||
report_fatal_error("getRelocationAddress not implemented in COFFObjectFile");
|
||||
}
|
||||
|
||||
std::error_code COFFObjectFile::getRelocationOffset(DataRefImpl Rel,
|
||||
uint64_t &Res) const {
|
||||
uint64_t COFFObjectFile::getRelocationOffset(DataRefImpl Rel) const {
|
||||
const coff_relocation *R = toRel(Rel);
|
||||
const support::ulittle32_t *VirtualAddressPtr;
|
||||
if (std::error_code EC =
|
||||
getObject(VirtualAddressPtr, Data, &R->VirtualAddress))
|
||||
return EC;
|
||||
Res = *VirtualAddressPtr;
|
||||
return std::error_code();
|
||||
return R->VirtualAddress;
|
||||
}
|
||||
|
||||
symbol_iterator COFFObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
|
||||
|
Reference in New Issue
Block a user