diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-01 02:58:40 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-01 02:58:40 +0000 |
| commit | b326986de02850926631480f58e75f1fda7f4752 (patch) | |
| tree | 3ca787eeca1c2d9de896c032d6d938b0b184c92f /llvm/lib/CodeGen | |
| parent | faef3207defce1e3d08b6eac5713cf1e7beca934 (diff) | |
| download | bcm5719-llvm-b326986de02850926631480f58e75f1fda7f4752.tar.gz bcm5719-llvm-b326986de02850926631480f58e75f1fda7f4752.zip | |
DwarfDebug: Simplify. NFC.
llvm-svn: 271360
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6195cae2052..51226fd639c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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; |

