mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +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:
@@ -681,6 +681,8 @@ public:
|
||||
COFFSymbolRef getCOFFSymbol(const DataRefImpl &Ref) const;
|
||||
COFFSymbolRef getCOFFSymbol(const SymbolRef &Symbol) const;
|
||||
const coff_relocation *getCOFFRelocation(const RelocationRef &Reloc) const;
|
||||
unsigned getSectionID(SectionRef Sec) const;
|
||||
unsigned getSymbolSectionID(SymbolRef Sym) const;
|
||||
|
||||
uint8_t getBytesInAddress() const override;
|
||||
StringRef getFileFormatName() const override;
|
||||
|
||||
@@ -216,6 +216,8 @@ public:
|
||||
uint32_t getSymbolFlags(DataRefImpl Symb) const override;
|
||||
std::error_code getSymbolSection(DataRefImpl Symb,
|
||||
section_iterator &Res) const override;
|
||||
unsigned getSymbolSectionID(SymbolRef Symb) const;
|
||||
unsigned getSectionID(SectionRef Sec) const;
|
||||
|
||||
void moveSectionNext(DataRefImpl &Sec) const override;
|
||||
std::error_code getSectionName(DataRefImpl Sec,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace llvm {
|
||||
namespace object {
|
||||
ErrorOr<std::vector<std::pair<SymbolRef, uint64_t>>>
|
||||
std::vector<std::pair<SymbolRef, uint64_t>>
|
||||
computeSymbolSizes(const ObjectFile &O);
|
||||
}
|
||||
} // namespace llvm
|
||||
|
||||
Reference in New Issue
Block a user