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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-30 03:33:18 +00:00
parent 85cd16c88e
commit 9f2f3bba2b
4 changed files with 12 additions and 22 deletions

View File

@ -888,13 +888,12 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
// Print relocation for instruction.
while (rel_cur != rel_end) {
bool hidden = false;
bool hidden = rel_cur->getHidden();
uint64_t addr = rel_cur->getOffset();
SmallString<16> name;
SmallString<32> val;
// If this relocation is hidden, skip it.
if (error(rel_cur->getHidden(hidden))) goto skip_print_rel;
if (hidden) goto skip_print_rel;
// Stop when rel_cur's address is past the current instruction.
@ -929,12 +928,10 @@ void llvm::PrintRelocations(const ObjectFile *Obj) {
continue;
outs() << "RELOCATION RECORDS FOR [" << secname << "]:\n";
for (const RelocationRef &Reloc : Section.relocations()) {
bool hidden;
bool hidden = Reloc.getHidden();
uint64_t address = Reloc.getOffset();
SmallString<32> relocname;
SmallString<32> valuestr;
if (error(Reloc.getHidden(hidden)))
continue;
if (hidden)
continue;
if (error(Reloc.getTypeName(relocname)))