Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

llvm-svn: 219314
diff --git a/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp b/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
index 903d1a8..ede36d1 100644
--- a/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
+++ b/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
@@ -186,13 +186,8 @@
 ErrorOr<object::SectionRef>
 Decoder::getSectionContaining(const COFFObjectFile &COFF, uint64_t VA) {
   for (const auto &Section : COFF.sections()) {
-    uint64_t Address;
-    uint64_t Size;
-
-    if (std::error_code EC = Section.getAddress(Address))
-      return EC;
-    if (std::error_code EC = Section.getSize(Size))
-      return EC;
+    uint64_t Address = Section.getAddress();
+    uint64_t Size = Section.getSize();
 
     if (VA >= Address && (VA - Address) <= Size)
       return Section;
@@ -525,10 +520,7 @@
   if (COFF.getSectionContents(COFF.getCOFFSection(Section), Contents))
     return false;
 
-  uint64_t SectionVA;
-  if (Section.getAddress(SectionVA))
-    return false;
-
+  uint64_t SectionVA = Section.getAddress();
   uint64_t Offset = VA - SectionVA;
   const ulittle32_t *Data =
     reinterpret_cast<const ulittle32_t *>(Contents.data() + Offset);