Don't return error_code from a function that doesn't fail.
llvm-svn: 241033
diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp
index 6c4bd3c..aba9a44 100644
--- a/llvm/lib/Object/Object.cpp
+++ b/llvm/lib/Object/Object.cpp
@@ -208,10 +208,7 @@
}
uint64_t LLVMGetRelocationType(LLVMRelocationIteratorRef RI) {
- uint64_t ret;
- if (std::error_code ec = (*unwrap(RI))->getType(ret))
- report_fatal_error(ec.message());
- return ret;
+ return (*unwrap(RI))->getType();
}
// NOTE: Caller takes ownership of returned string.