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-vtabledump/llvm-vtabledump.cpp b/llvm/tools/llvm-vtabledump/llvm-vtabledump.cpp
index a12cbf6..c005d7f 100644
--- a/llvm/tools/llvm-vtabledump/llvm-vtabledump.cpp
+++ b/llvm/tools/llvm-vtabledump/llvm-vtabledump.cpp
@@ -139,9 +139,8 @@
// Skip external symbols.
if (SecI == Obj->section_end())
continue;
- bool IsBSS, IsVirtual;
- if (error(SecI->isBSS(IsBSS)) || error(SecI->isVirtual(IsVirtual)))
- break;
+ bool IsBSS = SecI->isBSS();
+ bool IsVirtual = SecI->isVirtual();
// Skip virtual or BSS sections.
if (IsBSS || IsVirtual)
continue;