1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

DwarfDebug: Simplify. NFC.

llvm-svn: 271360
This commit is contained in:
Peter Collingbourne 2016-06-01 02:58:40 +00:00
parent f990f1720d
commit 9ae9106995

View File

@ -470,12 +470,8 @@ void DwarfDebug::beginModule() {
const Module *M = MMI->getModule();
unsigned NumDebugCUs = 0;
for (DICompileUnit *CUNode : M->debug_compile_units()) {
(void)CUNode;
++NumDebugCUs;
}
unsigned NumDebugCUs = std::distance(M->debug_compile_units_begin(),
M->debug_compile_units_end());
// Tell MMI whether we have debug info.
MMI->setDebugInfoAvailability(NumDebugCUs > 0);
SingleCU = NumDebugCUs == 1;