summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-09-18 21:44:40 +0000
committerAdrian Prantl <aprantl@apple.com>2017-09-18 21:44:40 +0000
commitc8d8653de8a50e335e275ac24b9b0fe5f960a125 (patch)
treee754b9b03f8561fcc49ee1bcee75ff6dce130d03 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parent59a1275be18b6384e91d359d727d8399f3364c9b (diff)
downloadbcm5719-llvm-c8d8653de8a50e335e275ac24b9b0fe5f960a125.tar.gz
bcm5719-llvm-c8d8653de8a50e335e275ac24b9b0fe5f960a125.zip
llvm-dwarfdump: use more efficient API (NFC)
llvm-svn: 313573
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index a5ee2dbd436..90df9f4e787 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -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);
}
};
OpenPOWER on IntegriCloud