15 #include "llvm/Config/llvm-config.h" 57 const char *LexedBackendName = CurPtr;
58 while (*CurPtr++ != 0)
63 bool IsForThisBackend = BackendName.
equals(LexedBackendName);
102 std::string CoverageFilename = (CoveragePrefix + Pid).str();
106 std::unique_ptr<ToolOutputFile> CoverageFile =
107 llvm::make_unique<ToolOutputFile>(CoverageFilename, EC,
OpenFlags);
112 uint64_t InvZero = ~0ull;
113 CoverageFile->os() << BackendName;
114 CoverageFile->os().write((
const char *)&Zero,
sizeof(
unsigned char));
116 CoverageFile->os().write((
const char *)&
I,
sizeof(uint64_t));
117 CoverageFile->os().write((
const char *)&InvZero,
sizeof(uint64_t));
119 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 LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
void setCovered(uint64_t RuleID)
static const std::string CoveragePrefix
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.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE 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.