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;
This file defines the DenseMap class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint32_t getOffset(const char *Str, unsigned Length)
DWPStringPool(MCStreamer &Out, MCSection *Sec)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
hash_code hash_value(const FixedPointSemantics &Val)
bool isEqual(const GCNRPTracker::LiveRegSet &S1, const GCNRPTracker::LiveRegSet &S2)