aboutsummaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
commite6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch)
tree599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
parent1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff)
Diffstat (limited to 'lib/DebugInfo/DWARF/DWARFDebugAddr.cpp')
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugAddr.cpp34
1 files changed, 9 insertions, 25 deletions
diff --git a/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp b/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
index 22759bfac26c..58626539bba4 100644
--- a/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
+++ b/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
@@ -1,9 +1,8 @@
//===- DWARFDebugAddr.cpp -------------------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -148,28 +147,13 @@ void DWARFDebugAddrTable::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const {
HeaderData.Length, HeaderData.Version, HeaderData.AddrSize,
HeaderData.SegSize);
- static const char *Fmt32 = "0x%8.8" PRIx64;
- static const char *Fmt64 = "0x%16.16" PRIx64;
- std::string AddrFmt = "\n";
- std::string AddrFmtVerbose = " => ";
- if (HeaderData.AddrSize == 4) {
- AddrFmt.append(Fmt32);
- AddrFmtVerbose.append(Fmt32);
- }
- else {
- AddrFmt.append(Fmt64);
- AddrFmtVerbose.append(Fmt64);
- }
-
if (Addrs.size() > 0) {
- OS << "Addrs: [";
- for (uint64_t Addr : Addrs) {
- OS << format(AddrFmt.c_str(), Addr);
- if (DumpOpts.Verbose)
- OS << format(AddrFmtVerbose.c_str(),
- Addr + HeaderOffset + sizeof(HeaderData));
- }
- OS << "\n]\n";
+ const char *AddrFmt = (HeaderData.AddrSize == 4) ? "0x%8.8" PRIx64 "\n"
+ : "0x%16.16" PRIx64 "\n";
+ OS << "Addrs: [\n";
+ for (uint64_t Addr : Addrs)
+ OS << format(AddrFmt, Addr);
+ OS << "]\n";
}
}