From: Fangrui Song Date: Wed, 27 Mar 2019 08:43:21 +0000 (+0000) Subject: [DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2d3bf630c34b662e50aa05e7c3a34fb08d10ae1;p=llvm [DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357053 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/lib/DebugInfo/DWARF/DWARFVerifier.cpp index 2ad33a3e143..dce622d8066 100644 --- a/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -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; }