16 using namespace llvm::codeview;
17 using namespace llvm::pdb;
22 return Name ==
"<unnamed-tag>" || Name ==
"__unnamed" ||
29 auto Opts =
static_cast<uint16_t
>(Rec.getOptions());
37 if (!ForwardRef && !Scoped && !IsAnon)
39 if (!ForwardRef && UniqueName && !IsAnon)
50 void TpiHashUpdater::visitKnownRecordImpl(
CVType &CVR,
55 void TpiHashUpdater::visitKnownRecordImpl(
CVType &CVR,
73 return verifySourceLine(Rec.
getUDT());
78 return verifySourceLine(Rec.
getUDT());
82 if (
getTpiHash(Rec, CVR.
data()) % NumHashBuckets != HashValues[Index])
83 return errorInvalidHash();
87 if (
getTpiHash(Rec, CVR.
data()) % NumHashBuckets != HashValues[Index])
88 return errorInvalidHash();
92 if (
getTpiHash(Rec, CVR.
data()) % NumHashBuckets != HashValues[Index])
93 return errorInvalidHash();
101 if (Hash % NumHashBuckets != HashValues[Index])
102 return errorInvalidHash();
uint32_t hashBufferV8(ArrayRef< uint8_t > Data)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
ArrayRef< uint8_t > data() const
void write32le(void *P, uint32_t V)
static bool isAnonymous(T &Rec)
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
uint32_t getIndex() const
uint32_t hashStringV1(StringRef Str)
Optional< uint32_t > Hash
static ErrorSuccess success()
Create a success value.
static uint32_t getTpiHash(T &Rec, ArrayRef< uint8_t > FullRecord)
static uint32_t getSourceLineHash(T &Rec)
Lightweight error class with error context and mandatory checking.
std::string Hash(const Unit &U)
StringRef - Represent a constant reference to a string, i.e.