Don't return error_code from a function that doesn't fail.
llvm-svn: 241033
diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp
index 1b8bdbe..4008527 100644
--- a/llvm/tools/llvm-readobj/COFFDumper.cpp
+++ b/llvm/tools/llvm-readobj/COFFDumper.cpp
@@ -804,11 +804,9 @@
void COFFDumper::printRelocation(const SectionRef &Section,
const RelocationRef &Reloc) {
uint64_t Offset = Reloc.getOffset();
- uint64_t RelocType;
+ uint64_t RelocType = Reloc.getType();
SmallString<32> RelocName;
StringRef SymbolName;
- if (error(Reloc.getType(RelocType)))
- return;
if (error(Reloc.getTypeName(RelocName)))
return;
symbol_iterator Symbol = Reloc.getSymbol();