From 02334f6cdc21eabd602a41dd08f6b63bd3148848 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 3 Nov 2016 08:41:46 +0000 Subject: [PATCH] [tools/obj2yaml] - Update after LLVM change r285886 llvm-svn: 285887 --- llvm/tools/obj2yaml/elf2yaml.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp index d736d8a..bc790e4 100644 --- a/llvm/tools/obj2yaml/elf2yaml.cpp +++ b/llvm/tools/obj2yaml/elf2yaml.cpp @@ -364,7 +364,10 @@ ErrorOr ELFDumper::dumpGroup(const Elf_Shdr *Shdr) { 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 SymOrErr = Obj.getSymbol(Symtab, Shdr->sh_info); + if (std::error_code EC = SymOrErr.getError()) + return EC; + const Elf_Sym *symbol = *SymOrErr; ErrorOr StrTabOrErr = Obj.getStringTableForSymtab(*Symtab); if (std::error_code EC = StrTabOrErr.getError()) return EC; -- 2.7.4