OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac42e99
)
DwarfDebug: Simplify. NFC.
author
Peter Collingbourne
<peter@pcc.me.uk>
Wed, 1 Jun 2016 02:58:40 +0000
(
02:58
+0000)
committer
Peter Collingbourne
<peter@pcc.me.uk>
Wed, 1 Jun 2016 02:58:40 +0000
(
02:58
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271360
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index
6195cae
..
51226fd
100644
(file)
--- a/
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/
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;