1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Return existing error code.

Should fix the -Werror bots.

llvm-svn: 285921
This commit is contained in:
Rafael Espindola 2016-11-03 14:53:25 +00:00
parent fc483a4565
commit 5fad526ea2

View File

@ -162,7 +162,7 @@ public:
uint32_t Index) const {
auto SymtabOrErr = symbols(Sec);
if (std::error_code EC = SymtabOrErr.getError())
return object_error::parse_failed;
return EC;
Elf_Sym_Range Symbols = *SymtabOrErr;
if (Index >= Symbols.size())
return object_error::invalid_symbol_index;