LLVM
16.0.0git
|
#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/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>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "coverage-mapping" |
Functions | |
static unsigned | getMaxCounterID (const CounterMappingContext &Ctx, const CoverageMappingRecord &Record) |
static Error | handleMaybeNoDataFoundError (Error E) |
static SmallBitVector | gatherFileIDs (StringRef SourceFile, const FunctionRecord &Function) |
static Optional< unsigned > | findMainViewFileID (const FunctionRecord &Function) |
Return the ID of the file where the definition of the function is located. More... | |
static Optional< unsigned > | findMainViewFileID (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) |
#define DEBUG_TYPE "coverage-mapping" |
Definition at line 44 of file CoverageMapping.cpp.
|
static |
Return the ID of the file where the definition of the function is located.
Definition at line 679 of file CoverageMapping.cpp.
References llvm::coverage::CounterMappingRegion::ExpansionRegion, llvm::SmallBitVector::find_first(), I, llvm::None, and llvm::Function::size().
Referenced by findMainViewFileID(), llvm::coverage::CoverageMapping::getCoverageForFile(), llvm::coverage::CoverageMapping::getCoverageForFunction(), and llvm::coverage::CoverageMapping::getInstantiationGroups().
|
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 692 of file CoverageMapping.cpp.
References findMainViewFileID(), I, and llvm::None.
|
static |
Definition at line 669 of file CoverageMapping.cpp.
References E, I, and llvm::Function::size().
Referenced by llvm::coverage::CoverageMapping::getCoverageForFile().
|
static |
Definition at line 861 of file CoverageMapping.cpp.
Referenced by llvm::coverage::CoverageMapError::message().
|
static |
Definition at line 223 of file CoverageMapping.cpp.
References llvm::coverage::CounterMappingContext::getMaxCounterID(), and llvm::max().
Definition at line 337 of file CoverageMapping.cpp.
References E, llvm::coverage::CoverageMapError::get(), llvm::handleErrors(), move, llvm::coverage::no_data_found, and llvm::Error::success().
Referenced by llvm::coverage::CoverageMapping::load().
|
static |
Definition at line 700 of file CoverageMapping.cpp.
References llvm::coverage::CounterMappingRegion::ExpansionRegion.
Referenced by llvm::coverage::CoverageMapping::getCoverageForExpansion(), llvm::coverage::CoverageMapping::getCoverageForFile(), and llvm::coverage::CoverageMapping::getCoverageForFunction().