mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Return ErrorOr from getSymbolAddress.
It can fail trying to get the section on ELF and COFF. This makes sure the error is handled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -376,10 +376,8 @@ uint64_t MachOObjectFile::getSymbolValue(DataRefImpl Sym) const {
|
||||
return NValue;
|
||||
}
|
||||
|
||||
std::error_code MachOObjectFile::getSymbolAddress(DataRefImpl Sym,
|
||||
uint64_t &Res) const {
|
||||
Res = getSymbolValue(Sym);
|
||||
return std::error_code();
|
||||
ErrorOr<uint64_t> MachOObjectFile::getSymbolAddress(DataRefImpl Sym) const {
|
||||
return getSymbolValue(Sym);
|
||||
}
|
||||
|
||||
uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
|
||||
|
Reference in New Issue
Block a user