[llvm] r357053 - [DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 01:43:21 PDT 2019
Author: maskray
Date: Wed Mar 27 01:43:21 2019
New Revision: 357053
URL: http://llvm.org/viewvc/llvm-project?rev=357053&view=rev
Log:
[DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp?rev=357053&r1=357052&r2=357053&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp Wed Mar 27 01:43:21 2019
@@ -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;
}
More information about the llvm-commits
mailing list