diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp b/contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp index 2b08120ef4..cfd72886d8 100644 --- a/contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp +++ b/contrib/libs/llvm12/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp @@ -1,41 +1,41 @@ -//===-- DWARFCompileUnit.cpp ----------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" -#include "llvm/DebugInfo/DWARF/DWARFDie.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/raw_ostream.h" - -using namespace llvm; - -void DWARFCompileUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) { - int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(getFormat()); - OS << format("0x%08" PRIx64, getOffset()) << ": Compile Unit:" - << " length = " << format("0x%0*" PRIx64, OffsetDumpWidth, getLength()) - << ", format = " << dwarf::FormatString(getFormat()) - << ", version = " << format("0x%04x", getVersion()); - if (getVersion() >= 5) - OS << ", unit_type = " << dwarf::UnitTypeString(getUnitType()); +//===-- DWARFCompileUnit.cpp ----------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" +#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" +#include "llvm/DebugInfo/DWARF/DWARFDie.h" +#include "llvm/Support/Format.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; + +void DWARFCompileUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) { + int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(getFormat()); + OS << format("0x%08" PRIx64, getOffset()) << ": Compile Unit:" + << " length = " << format("0x%0*" PRIx64, OffsetDumpWidth, getLength()) + << ", format = " << dwarf::FormatString(getFormat()) + << ", version = " << format("0x%04x", getVersion()); + if (getVersion() >= 5) + OS << ", unit_type = " << dwarf::UnitTypeString(getUnitType()); OS << ", abbr_offset = " << format("0x%04" PRIx64, getAbbrOffset()); if (!getAbbreviations()) OS << " (invalid)"; OS << ", addr_size = " << format("0x%02x", getAddressByteSize()); - if (getVersion() >= 5 && getUnitType() != dwarf::DW_UT_compile) - OS << ", DWO_id = " << format("0x%016" PRIx64, *getDWOId()); - OS << " (next unit at " << format("0x%08" PRIx64, getNextUnitOffset()) - << ")\n"; - - if (DWARFDie CUDie = getUnitDIE(false)) - CUDie.dump(OS, 0, DumpOpts); - else - OS << "<compile unit can't be parsed!>\n\n"; -} - -// VTable anchor. -DWARFCompileUnit::~DWARFCompileUnit() = default; + if (getVersion() >= 5 && getUnitType() != dwarf::DW_UT_compile) + OS << ", DWO_id = " << format("0x%016" PRIx64, *getDWOId()); + OS << " (next unit at " << format("0x%08" PRIx64, getNextUnitOffset()) + << ")\n"; + + if (DWARFDie CUDie = getUnitDIE(false)) + CUDie.dump(OS, 0, DumpOpts); + else + OS << "<compile unit can't be parsed!>\n\n"; +} + +// VTable anchor. +DWARFCompileUnit::~DWARFCompileUnit() = default; |