]> granicus.if.org Git - llvm/commitdiff
[DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC
authorFangrui Song <maskray@google.com>
Wed, 27 Mar 2019 08:43:21 +0000 (08:43 +0000)
committerFangrui Song <maskray@google.com>
Wed, 27 Mar 2019 08:43:21 +0000 (08:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357053 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFVerifier.cpp

index 2ad33a3e1432f51dffd4fcabe2b9b667d0f614c3..dce622d8066aaa25d2d69b6e72f430555a62f057 100644 (file)
@@ -280,19 +280,12 @@ bool DWARFVerifier::handleDebugAbbrev() {
   OS << "Verifying .debug_abbrev...\n";
 
   const DWARFObject &DObj = DCtx.getDWARFObj();
-  bool noDebugAbbrev = DObj.getAbbrevSection().empty();
-  bool noDebugAbbrevDWO = DObj.getAbbrevDWOSection().empty();
-
-  if (noDebugAbbrev && noDebugAbbrevDWO) {
-    return true;
-  }
-
   unsigned NumErrors = 0;
-  if (!noDebugAbbrev)
+  if (!DObj.getAbbrevSection().empty())
     NumErrors += verifyAbbrevSection(DCtx.getDebugAbbrev());
-
-  if (!noDebugAbbrevDWO)
+  if (!DObj.getAbbrevDWOSection().empty())
     NumErrors += verifyAbbrevSection(DCtx.getDebugAbbrevDWO());
+
   return NumErrors == 0;
 }