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

@ -807,8 +807,7 @@ void COFFDumper::printRelocation(const SectionRef &Section,
uint64_t RelocType = Reloc.getType();
SmallString<32> RelocName;
StringRef SymbolName;
if (error(Reloc.getTypeName(RelocName)))
return;
Reloc.getTypeName(RelocName);
symbol_iterator Symbol = Reloc.getSymbol();
if (Symbol != Obj->symbol_end() && error(Symbol->getName(SymbolName)))
return;

View File

@ -463,8 +463,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj,
const RelocationRef &Reloc) {
uint64_t Offset = Reloc.getOffset();
SmallString<32> RelocName;
if (error(Reloc.getTypeName(RelocName)))
return;
Reloc.getTypeName(RelocName);
DataRefImpl DR = Reloc.getRawDataRefImpl();
MachO::any_relocation_info RE = Obj->getRelocation(DR);