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

          Line data    Source code
       1             : //===- DWARFDataExtractor.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/DWARFDataExtractor.h"
      11             : #include "llvm/DebugInfo/DWARF/DWARFContext.h"
      12             : 
      13             : using namespace llvm;
      14             : 
      15     4184011 : uint64_t DWARFDataExtractor::getRelocatedValue(uint32_t Size, uint32_t *Off,
      16             :                                                uint64_t *SecNdx) const {
      17     4184011 :   if (SecNdx)
      18     2136480 :     *SecNdx = -1ULL;
      19     4184011 :   if (!Section)
      20        2180 :     return getUnsigned(Off, Size);
      21     4181831 :   Optional<RelocAddrEntry> Rel = Obj->find(*Section, *Off);
      22     4181831 :   if (!Rel)
      23     4176083 :     return getUnsigned(Off, Size);
      24        5748 :   if (SecNdx)
      25         985 :     *SecNdx = Rel->SectionIndex;
      26       11496 :   return getUnsigned(Off, Size) + Rel->Value;
      27             : }

Generated by: LCOV version 1.13