1#ifndef LLVM_DWP_DWPSTRINGPOOL_H 2#define LLVM_DWP_DWPSTRINGPOOL_H 12structCStrDenseMapInfo {
13staticinlineconstchar *getEmptyKey() {
14returnreinterpret_cast<constchar *
>(~static_cast<uintptr_t>(0));
16staticinlineconstchar *getTombstoneKey() {
17returnreinterpret_cast<constchar *
>(~static_cast<uintptr_t>(1));
19staticunsigned getHashValue(
constchar *Val) {
20assert(Val != getEmptyKey() &&
"Cannot hash the empty key!");
21assert(Val != getTombstoneKey() &&
"Cannot hash the tombstone key!");
25if (
RHS == getEmptyKey())
26returnLHS == getEmptyKey();
27if (
RHS == getTombstoneKey())
28returnLHS == getTombstoneKey();
29return strcmp(
LHS,
RHS) == 0;
42assert(strlen(Str) + 1 ==
Length &&
"Ensure length hint is correct");
44auto Pair = Pool.
insert(std::make_pair(Str, Offset));
51return Pair.first->second;
56#endif// LLVM_DWP_DWPSTRINGPOOL_H 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)