21 return Name ==
"<unnamed-tag>" ||
Name ==
"__unnamed" ||
22 Name.ends_with(
"::<unnamed-tag>") ||
Name.ends_with(
"::__unnamed");
30 bool ForwardRef =
bool(Opts & ClassOptions::ForwardReference);
31 bool Scoped =
bool(Opts & ClassOptions::Scoped);
35 if (!ForwardRef && !
Scoped && !IsAnon)
60 bool ForwardRef =
bool(Opts & ClassOptions::ForwardReference);
67 return TagRecordHash{std::move(Deserialized), ThisRecordHash, 0};
69 bool Scoped =
bool(Opts & ClassOptions::Scoped);
72 Scoped ? Deserialized.getUniqueName() : Deserialized.getName();
74 return TagRecordHash{std::move(Deserialized), FullHash, ThisRecordHash};
89 switch (
Type.kind()) {
93 return getTagRecordHashForUdt<ClassRecord>(
Type);
95 return getTagRecordHashForUdt<UnionRecord>(
Type);
97 return getTagRecordHashForUdt<EnumRecord>(
Type);
99 assert(
false &&
"Type is not a tag record!");
101 return make_error<StringError>(
"Invalid record type",
106 switch (Rec.
kind()) {
110 return getHashForUdt<ClassRecord>(Rec);
112 return getHashForUdt<UnionRecord>(Rec);
114 return getHashForUdt<EnumRecord>(Rec);
116 case LF_UDT_SRC_LINE:
117 return getSourceLineHash<UdtSourceLineRecord>(Rec);
118 case LF_UDT_MOD_SRC_LINE:
119 return getSourceLineHash<UdtModSourceLineRecord>(Rec);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static Expected< uint32_t > getSourceLineHash(const CVType &Rec)
static bool isAnonymous(StringRef Name)
static Expected< TagRecordHash > getTagRecordHashForUdt(const CVType &Rec)
static uint32_t getHashForUdt(const TagRecord &Rec, ArrayRef< uint8_t > FullRecord)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
void update(ArrayRef< uint8_t > Data)
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
ArrayRef< uint8_t > data() const
ClassOptions getOptions() const
StringRef getName() const
StringRef getUniqueName() const
static Error deserializeAs(CVType &CVT, T &Record)
uint32_t hashStringV1(StringRef Str)
Expected< uint32_t > hashTypeRecord(const llvm::codeview::CVType &Type)
uint32_t hashBufferV8(ArrayRef< uint8_t > Data)
Expected< TagRecordHash > hashTagRecord(const codeview::CVType &Type)
Given a CVType referring to a class, structure, union, or enum, compute the hash of its forward decl ...
void write32le(void *P, uint32_t V)
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...