[llvm] r285887 - [tools/obj2yaml] - Update after LLVM change r285886
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 01:41:46 PDT 2016
Author: grimar
Date: Thu Nov 3 03:41:46 2016
New Revision: 285887
URL: http://llvm.org/viewvc/llvm-project?rev=285887&view=rev
Log:
[tools/obj2yaml] - Update after LLVM change r285886
Modified:
llvm/trunk/tools/obj2yaml/elf2yaml.cpp
Modified: llvm/trunk/tools/obj2yaml/elf2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/elf2yaml.cpp?rev=285887&r1=285886&r2=285887&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/elf2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/elf2yaml.cpp Thu Nov 3 03:41:46 2016
@@ -364,7 +364,10 @@ ErrorOr<ELFYAML::Group *> ELFDumper<ELFT
if (std::error_code EC = SymtabOrErr.getError())
return EC;
const Elf_Shdr *Symtab = *SymtabOrErr;
- const Elf_Sym *symbol = Obj.getSymbol(Symtab, Shdr->sh_info);
+ ErrorOr<const Elf_Sym *> SymOrErr = Obj.getSymbol(Symtab, Shdr->sh_info);
+ if (std::error_code EC = SymOrErr.getError())
+ return EC;
+ const Elf_Sym *symbol = *SymOrErr;
ErrorOr<StringRef> StrTabOrErr = Obj.getStringTableForSymtab(*Symtab);
if (std::error_code EC = StrTabOrErr.getError())
return EC;
More information about the llvm-commits
mailing list