diff options
Diffstat (limited to 'include/llvm/Object/ELFObjectFile.h')
-rw-r--r-- | include/llvm/Object/ELFObjectFile.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/Object/ELFObjectFile.h b/include/llvm/Object/ELFObjectFile.h index f6b874397a..5433a7a1b3 100644 --- a/include/llvm/Object/ELFObjectFile.h +++ b/include/llvm/Object/ELFObjectFile.h @@ -65,7 +65,7 @@ protected: error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const LLVM_OVERRIDE; error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const LLVM_OVERRIDE; - error_code getSymbolFlags(DataRefImpl Symb, uint32_t &Res) const; + uint32_t getSymbolFlags(DataRefImpl Symb) const LLVM_OVERRIDE; error_code getSymbolType(DataRefImpl Symb, SymbolRef::Type &Res) const LLVM_OVERRIDE; error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const @@ -378,11 +378,10 @@ error_code ELFObjectFile<ELFT>::getSymbolType(DataRefImpl Symb, } template <class ELFT> -error_code ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb, - uint32_t &Result) const { +uint32_t ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb) const { const Elf_Sym *ESym = getSymbol(Symb); - Result = SymbolRef::SF_None; + uint32_t Result = SymbolRef::SF_None; if (ESym->getBinding() != ELF::STB_LOCAL) Result |= SymbolRef::SF_Global; @@ -407,7 +406,7 @@ error_code ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb, if (ESym->getType() == ELF::STT_TLS) Result |= SymbolRef::SF_ThreadLocal; - return object_error::success; + return Result; } template <class ELFT> |