14 #include "llvm/Config/llvm-config.h" 56 const char *LexedBackendName = CurPtr;
57 while (*CurPtr++ != 0)
62 bool IsForThisBackend = BackendName.
equals(LexedBackendName);
101 std::string CoverageFilename = (CoveragePrefix + Pid).str();
105 std::unique_ptr<ToolOutputFile> CoverageFile =
106 std::make_unique<ToolOutputFile>(CoverageFilename, EC,
OpenFlags);
111 uint64_t InvZero = ~0ull;
112 CoverageFile->os() << BackendName;
113 CoverageFile->os().write((
const char *)&Zero,
sizeof(
unsigned char));
115 CoverageFile->os().write((
const char *)&
I,
sizeof(uint64_t));
116 CoverageFile->os().write((
const char *)&InvZero,
sizeof(uint64_t));
118 CoverageFile->keep();
void resize(unsigned N, bool t=false)
resize - Grow or shrink the bitvector.
This class represents lattice values for constants.
bool empty() const
empty - Tests whether there are no bits in this bitvector.
SmartMutex - A mutex with a compile time constant parameter that indicates whether this mutex should ...
bool parse(MemoryBuffer &Buffer, StringRef BackendName)
bool emit(StringRef FilePrefix, StringRef BackendName) const
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
void setCovered(uint64_t RuleID)
static const std::string CoveragePrefix
The file should be opened in append mode.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
A range adaptor for a pair of iterators.
std::lock_guard< SmartMutex< mt_only > > SmartScopedLock
LLVM_NODISCARD bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
const char * getBufferEnd() const
static sys::SmartMutex< true > OutputMutex
iterator_range< const_covered_iterator > covered() const
bool isCovered(uint64_t RuleID) const
size_type size() const
size - Returns the number of bits in this bitvector.
const char * getBufferStart() const
const std::string to_string(const T &Value)
iterator_range< const_set_bits_iterator > set_bits() const
uint64_t read64(const void *P, endianness E)
StringRef - Represent a constant reference to a string, i.e.