LCOV - code coverage report
Current view: top level - include/llvm/ProfileData/Coverage - CoverageMappingWriter.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 3 3 100.0 %
Date: 2017-09-14 15:23:50 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- CoverageMappingWriter.h - Code coverage mapping writer ---*- C++ -*-===//
       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             : // This file contains support for writing coverage mapping data for
      11             : // instrumentation based coverage.
      12             : //
      13             : //===----------------------------------------------------------------------===//
      14             : 
      15             : #ifndef LLVM_PROFILEDATA_COVERAGE_COVERAGEMAPPINGWRITER_H
      16             : #define LLVM_PROFILEDATA_COVERAGE_COVERAGEMAPPINGWRITER_H
      17             : 
      18             : #include "llvm/ADT/ArrayRef.h"
      19             : #include "llvm/ADT/StringRef.h"
      20             : #include "llvm/ProfileData/Coverage/CoverageMapping.h"
      21             : 
      22             : namespace llvm {
      23             : 
      24             : class raw_ostream;
      25             : 
      26             : namespace coverage {
      27             : 
      28             : /// \brief Writer of the filenames section for the instrumentation
      29             : /// based code coverage.
      30             : class CoverageFilenamesSectionWriter {
      31             :   ArrayRef<StringRef> Filenames;
      32             : 
      33             : public:
      34             :   CoverageFilenamesSectionWriter(ArrayRef<StringRef> Filenames)
      35          53 :       : Filenames(Filenames) {}
      36             : 
      37             :   /// \brief Write encoded filenames to the given output stream.
      38             :   void write(raw_ostream &OS);
      39             : };
      40             : 
      41             : /// \brief Writer for instrumentation based coverage mapping data.
      42             : class CoverageMappingWriter {
      43             :   ArrayRef<unsigned> VirtualFileMapping;
      44             :   ArrayRef<CounterExpression> Expressions;
      45             :   MutableArrayRef<CounterMappingRegion> MappingRegions;
      46             : 
      47             : public:
      48             :   CoverageMappingWriter(ArrayRef<unsigned> VirtualFileMapping,
      49             :                         ArrayRef<CounterExpression> Expressions,
      50             :                         MutableArrayRef<CounterMappingRegion> MappingRegions)
      51         265 :       : VirtualFileMapping(VirtualFileMapping), Expressions(Expressions),
      52         265 :         MappingRegions(MappingRegions) {}
      53             : 
      54             :   /// \brief Write encoded coverage mapping data to the given output stream.
      55             :   void write(raw_ostream &OS);
      56             : };
      57             : 
      58             : } // end namespace coverage
      59             : 
      60             : } // end namespace llvm
      61             : 
      62             : #endif // LLVM_PROFILEDATA_COVERAGE_COVERAGEMAPPINGWRITER_H

Generated by: LCOV version 1.13