mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +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:
@@ -269,9 +269,10 @@ static int printLineInfoForInput(bool LoadObjects, bool UseDebugObj) {
|
||||
ErrorOr<StringRef> Name = Sym.getName();
|
||||
if (!Name)
|
||||
continue;
|
||||
uint64_t Addr;
|
||||
if (Sym.getAddress(Addr))
|
||||
ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
|
||||
if (!AddrOrErr)
|
||||
continue;
|
||||
uint64_t Addr = *AddrOrErr;
|
||||
|
||||
uint64_t Size = P.second;
|
||||
// If we're not using the debug object, compute the address of the
|
||||
|
Reference in New Issue
Block a user