mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 23:29:20 +00:00
Object: Small cleanup in COFFObjectFile::getSymbol
NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a476ce78a0
commit
ddf2ec4d4b
@ -569,10 +569,10 @@ public:
|
||||
template <typename coff_symbol_type>
|
||||
std::error_code getSymbol(uint32_t Index,
|
||||
const coff_symbol_type *&Res) const {
|
||||
if (Index < getNumberOfSymbols())
|
||||
Res = reinterpret_cast<coff_symbol_type *>(getSymbolTable()) + Index;
|
||||
else
|
||||
if (Index >= getNumberOfSymbols())
|
||||
return object_error::parse_failed;
|
||||
|
||||
Res = reinterpret_cast<coff_symbol_type *>(getSymbolTable()) + Index;
|
||||
return object_error::success;
|
||||
}
|
||||
ErrorOr<COFFSymbolRef> getSymbol(uint32_t index) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user