Go to the documentation of this file. 1 #ifndef LLVM_DWP_DWPSTRINGPOOL_H
2 #define LLVM_DWP_DWPSTRINGPOOL_H
12 struct CStrDenseMapInfo {
13 static inline const char *getEmptyKey() {
14 return reinterpret_cast<const char *
>(~static_cast<uintptr_t>(0));
16 static inline const char *getTombstoneKey() {
17 return reinterpret_cast<const char *
>(~static_cast<uintptr_t>(1));
19 static unsigned getHashValue(
const char *Val) {
20 assert(Val != getEmptyKey() &&
"Cannot hash the empty key!");
21 assert(Val != getTombstoneKey() &&
"Cannot hash the tombstone key!");
25 if (
RHS == getEmptyKey())
26 return LHS == getEmptyKey();
27 if (
RHS == getTombstoneKey())
28 return LHS == getTombstoneKey();
29 return strcmp(
LHS,
RHS) == 0;
42 assert(strlen(Str) + 1 == Length &&
"Ensure length hint is correct");
44 auto Pair = Pool.
insert(std::make_pair(Str, Offset));
51 return Pair.first->second;
56 #endif // LLVM_DWP_DWPSTRINGPOOL_H
uint32_t getOffset(const char *Str, unsigned Length)
This is an optimization pass for GlobalISel generic memory operations.
DWPStringPool(MCStreamer &Out, MCSection *Sec)
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
bool isEqual(const GCNRPTracker::LiveRegSet &S1, const GCNRPTracker::LiveRegSet &S2)
Streaming machine code generation interface.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.