LLVM  8.0.1
Macros | Functions | Variables
CoverageMapping.cpp File Reference
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <system_error>
#include <utility>
#include <vector>
Include dependency graph for CoverageMapping.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "coverage-mapping"
 

Functions

static SmallBitVector gatherFileIDs (StringRef SourceFile, const FunctionRecord &Function)
 
static Optional< unsignedfindMainViewFileID (const FunctionRecord &Function)
 Return the ID of the file where the definition of the function is located. More...
 
static Optional< unsignedfindMainViewFileID (StringRef SourceFile, const FunctionRecord &Function)
 Check if SourceFile is the file that contains the definition of the Function. More...
 
static bool isExpansion (const CountedRegion &R, unsigned FileID)
 
static std::string getCoverageMapErrString (coveragemap_error Err)
 

Variables

static ManagedStatic< CoverageMappingErrorCategoryType > ErrorCategory
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "coverage-mapping"

Definition at line 46 of file CoverageMapping.cpp.

Function Documentation

◆ findMainViewFileID() [1/2]

static Optional<unsigned> findMainViewFileID ( const FunctionRecord Function)
static

◆ findMainViewFileID() [2/2]

static Optional<unsigned> findMainViewFileID ( StringRef  SourceFile,
const FunctionRecord Function 
)
static

Check if SourceFile is the file that contains the definition of the Function.

Return the ID of the file in that case or None otherwise.

Definition at line 592 of file CoverageMapping.cpp.

References llvm::coverage::FunctionRecord::Filenames, findMainViewFileID(), I, and llvm::None.

◆ gatherFileIDs()

static SmallBitVector gatherFileIDs ( StringRef  SourceFile,
const FunctionRecord Function 
)
static

◆ getCoverageMapErrString()

static std::string getCoverageMapErrString ( coveragemap_error  Err)
static

Definition at line 739 of file CoverageMapping.cpp.

Referenced by llvm::coverage::CoverageMapError::message().

◆ isExpansion()

static bool isExpansion ( const CountedRegion R,
unsigned  FileID 
)
static

Variable Documentation

◆ ErrorCategory

ManagedStatic<CoverageMappingErrorCategoryType> ErrorCategory
static

Definition at line 775 of file CoverageMapping.cpp.

Referenced by llvm::coverage::coveragemap_category().