1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[DWARF] Simplify DWARFVerifier::handleDebugAbbrev. NFC

llvm-svn: 357053
This commit is contained in:
Fangrui Song 2019-03-27 08:43:21 +00:00
parent 3fb04e5ab0
commit 9b9ffbc901

View File

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