LLVM 20.0.0git
Static Public Member Functions | Public Attributes | List of all members
llvm::codeview::LocallyHashedType Struct Reference

A locally hashed type represents a straightforward hash code of a serialized record. More...

#include "llvm/DebugInfo/CodeView/TypeHashing.h"

Static Public Member Functions

static LocallyHashedType hashType (ArrayRef< uint8_t > RecordData)
 Given a type, compute its local hash.
 
template<typename Range >
static std::vector< LocallyHashedTypehashTypes (Range &&Records)
 Given a sequence of types, compute all of the local hashes.
 
static std::vector< LocallyHashedTypehashTypeCollection (TypeCollection &Types)
 

Public Attributes

hash_code Hash
 
ArrayRef< uint8_t > RecordData
 

Detailed Description

A locally hashed type represents a straightforward hash code of a serialized record.

The record is simply serialized, and then the bytes are hashed by a standard algorithm. This is sufficient for the case of de-duplicating records within a single sequence of types, because if two records both have a back-reference to the same type in the same stream, they will both have the same numeric value for the TypeIndex of the back reference.

Definition at line 34 of file TypeHashing.h.

Member Function Documentation

◆ hashType()

LocallyHashedType LocallyHashedType::hashType ( ArrayRef< uint8_t >  RecordData)
static

Given a type, compute its local hash.

Definition at line 28 of file TypeHashing.cpp.

References llvm::hash_value(), and RecordData.

Referenced by hashTypeCollection(), and hashTypes().

◆ hashTypeCollection()

static std::vector< LocallyHashedType > llvm::codeview::LocallyHashedType::hashTypeCollection ( TypeCollection Types)
inlinestatic

Definition at line 53 of file TypeHashing.h.

References hashType().

◆ hashTypes()

template<typename Range >
static std::vector< LocallyHashedType > llvm::codeview::LocallyHashedType::hashTypes ( Range &&  Records)
inlinestatic

Given a sequence of types, compute all of the local hashes.

Definition at line 43 of file TypeHashing.h.

References hashType().

Member Data Documentation

◆ Hash

hash_code llvm::codeview::LocallyHashedType::Hash

◆ RecordData

ArrayRef<uint8_t> llvm::codeview::LocallyHashedType::RecordData

Definition at line 36 of file TypeHashing.h.

Referenced by hashType().


The documentation for this struct was generated from the following files: