[llvm] r313573 - llvm-dwarfdump: use more efficient API (NFC)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 14:44:41 PDT 2017
Author: adrian
Date: Mon Sep 18 14:44:40 2017
New Revision: 313573
URL: http://llvm.org/viewvc/llvm-project?rev=313573&view=rev
Log:
llvm-dwarfdump: use more efficient API (NFC)
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=313573&r1=313572&r2=313573&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Mon Sep 18 14:44:40 2017
@@ -257,10 +257,10 @@ void DWARFContext::dump(
auto dumpDebugInfo = [&](bool IsExplicit, const char *Name,
DWARFSection Section, cu_iterator_range CUs) {
if (shouldDump(IsExplicit, Name, DIDT_ID_DebugInfo, Section.Data)) {
- for (const auto &CU : CUs)
- if (DumpOffset)
- CU->getDIEForOffset(DumpOffset.getValue()).dump(OS, 0, 0, DumpOpts);
- else
+ if (DumpOffset)
+ getDIEForOffset(DumpOffset.getValue()).dump(OS, 0, 0, DumpOpts);
+ else
+ for (const auto &CU : CUs)
CU->dump(OS, DumpOpts);
}
};
More information about the llvm-commits
mailing list