mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 04:24:22 +00:00
Make computeSymbolSizes never fail.
On ELF that was already the case since getting the size of a symbol never fails. On MachO and COFF we could fail trying to get the section of a symbol. But we don't really need the section, just the section number to know if two symbols are in the same section or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -188,12 +188,10 @@ static void dumpCXXData(const ObjectFile *Obj) {
|
||||
|
||||
uint8_t BytesInAddress = Obj->getBytesInAddress();
|
||||
|
||||
ErrorOr<std::vector<std::pair<SymbolRef, uint64_t>>> SymAddrOrErr =
|
||||
std::vector<std::pair<SymbolRef, uint64_t>> SymAddr =
|
||||
object::computeSymbolSizes(*Obj);
|
||||
if (error(SymAddrOrErr.getError()))
|
||||
return;
|
||||
|
||||
for (auto &P : *SymAddrOrErr) {
|
||||
for (auto &P : SymAddr) {
|
||||
object::SymbolRef Sym = P.first;
|
||||
uint64_t SymSize = P.second;
|
||||
StringRef SymName;
|
||||
|
Reference in New Issue
Block a user