From c2d3bf630c34b662e50aa05e7c3a34fb08d10ae1 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 27 Mar 2019 08:43:21 +0000 Subject: [PATCH] [DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357053 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARF/DWARFVerifier.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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; } -- 2.50.1