LCOV - code coverage report
Current view: top level - lib/DebugInfo/DWARF - DWARFCompileUnit.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 14 14 100.0 %
Date: 2017-09-14 15:23:50 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- DWARFCompileUnit.cpp ----------------------------------------------===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : 
      10             : #include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"
      11             : #include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h"
      12             : #include "llvm/DebugInfo/DWARF/DWARFDie.h"
      13             : #include "llvm/Support/Format.h"
      14             : #include "llvm/Support/raw_ostream.h"
      15             : 
      16             : using namespace llvm;
      17             : 
      18         504 : void DWARFCompileUnit::dump(raw_ostream &OS, DIDumpOptions DumpOpts) {
      19        1512 :   OS << format("0x%08x", getOffset()) << ": Compile Unit:"
      20        1512 :      << " length = " << format("0x%08x", getLength())
      21        1008 :      << " version = " << format("0x%04x", getVersion());
      22         504 :   if (getVersion() >= 5)
      23          20 :     OS << " unit_type = " << dwarf::UnitTypeString(getUnitType());
      24        1512 :   OS << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset())
      25        1512 :      << " addr_size = " << format("0x%02x", getAddressByteSize())
      26        2016 :      << " (next unit at " << format("0x%08x", getNextUnitOffset())
      27         504 :      << ")\n";
      28             : 
      29        1512 :   if (DWARFDie CUDie = getUnitDIE(false))
      30         503 :     CUDie.dump(OS, -1U, 0, DumpOpts);
      31             :   else
      32           1 :     OS << "<compile unit can't be parsed!>\n\n";
      33         504 : }
      34             : 
      35             : // VTable anchor.
      36             : DWARFCompileUnit::~DWARFCompileUnit() = default;

Generated by: LCOV version 1.13