- virtual std::error_code getSymbolAddress(DataRefImpl Symb,
- uint64_t &Res) const = 0;
- virtual std::error_code getSymbolAlignment(DataRefImpl Symb,
- uint32_t &Res) const;
- virtual std::error_code getSymbolSize(DataRefImpl Symb,
- uint64_t &Res) const = 0;
- virtual std::error_code getSymbolType(DataRefImpl Symb,
- SymbolRef::Type &Res) const = 0;
- virtual std::error_code getSymbolSection(DataRefImpl Symb,
- section_iterator &Res) const = 0;
- virtual std::error_code getSymbolOther(DataRefImpl Symb,
- uint8_t &Res) const {
- return object_error::invalid_file_type;
- }
+ virtual ErrorOr<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0;
+ virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const = 0;
+ virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const;
+ virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const = 0;
+ virtual SymbolRef::Type getSymbolType(DataRefImpl Symb) const = 0;
+ virtual ErrorOr<section_iterator>
+ getSymbolSection(DataRefImpl Symb) const = 0;