Don't return error_code from a function that doesn't fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-30 04:08:37 +00:00
parent 06bc362502
commit f8a35ff558
11 changed files with 23 additions and 47 deletions

View File

@ -931,7 +931,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
// Stop when rel_cur's address is past the current instruction.
if (addr >= Index + Size) break;
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
rel_cur->getTypeName(name);
if (error(getRelocationValueString(*rel_cur, val)))
goto skip_print_rel;
outs() << format(Fmt.data(), SectionAddr + addr) << name
@ -967,8 +967,7 @@ void llvm::PrintRelocations(const ObjectFile *Obj) {
SmallString<32> valuestr;
if (hidden)
continue;
if (error(Reloc.getTypeName(relocname)))
continue;
Reloc.getTypeName(relocname);
if (error(getRelocationValueString(Reloc, valuestr)))
continue;
outs() << format(Fmt.data(), address) << " " << relocname << " "