LLVM  12.0.0git
Enumerations | Functions
GCOV.cpp File Reference
#include "llvm/ProfileData/GCOV.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <system_error>
Include dependency graph for GCOV.cpp:

Go to the source code of this file.

Enumerations

enum  : uint32_t {
  GCOV_ARC_ON_TREE = 1 << 0, GCOV_ARC_FALLTHROUGH = 1 << 2, GCOV_TAG_FUNCTION = 0x01000000, GCOV_TAG_BLOCKS = 0x01410000,
  GCOV_TAG_ARCS = 0x01430000, GCOV_TAG_LINES = 0x01450000, GCOV_TAG_COUNTER_ARCS = 0x01a10000, GCOV_TAG_OBJECT_SUMMARY = 0xa1000000,
  GCOV_TAG_PROGRAM_SUMMARY = 0xa3000000
}
 

Functions

static uint32_t safeDiv (uint64_t Numerator, uint64_t Divisor)
 
static uint32_t branchDiv (uint64_t Numerator, uint64_t Divisor)
 
static std::string mangleCoveragePath (StringRef Filename, bool PreservePaths)
 Convert a path to a gcov filename. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : uint32_t
Enumerator
GCOV_ARC_ON_TREE 
GCOV_ARC_FALLTHROUGH 
GCOV_TAG_FUNCTION 
GCOV_TAG_BLOCKS 
GCOV_TAG_ARCS 
GCOV_TAG_LINES 
GCOV_TAG_COUNTER_ARCS 
GCOV_TAG_OBJECT_SUMMARY 
GCOV_TAG_PROGRAM_SUMMARY 

Definition at line 28 of file GCOV.cpp.

Function Documentation

◆ branchDiv()

static uint32_t branchDiv ( uint64_t  Numerator,
uint64_t  Divisor 
)
static

◆ mangleCoveragePath()

static std::string mangleCoveragePath ( StringRef  Filename,
bool  PreservePaths 
)
static

Convert a path to a gcov filename.

If PreservePaths is true, this translates "/" to "#", ".." to "^", and drops ".", to match gcov.

Definition at line 549 of file GCOV.cpp.

References llvm::SmallString< InternalLen >::append(), llvm::StringRef::begin(), E, llvm::StringRef::end(), llvm::sys::path::filename(), I, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::StringRef::str(), and llvm::SmallString< InternalLen >::str().

Referenced by llvm::FileInfo::getCoveragePath().

◆ safeDiv()

static uint32_t safeDiv ( uint64_t  Numerator,
uint64_t  Divisor 
)
static

Definition at line 471 of file GCOV.cpp.

Referenced by llvm::FileInfo::printFunctionSummary().