LLVM API Documentation
An object containing the capability of hashing and adding hash attributes onto a DIE. More...
#include <DIEHash.h>
Classes | |
struct | AttrEntry |
struct | DIEAttrs |
Public Member Functions | |
DIEHash (AsmPrinter *A=nullptr) | |
uint64_t | computeDIEODRSignature (const DIE &Die) |
Computes the ODR signature. | |
uint64_t | computeCUSignature (const DIE &Die) |
Computes the CU signature. | |
uint64_t | computeTypeSignature (const DIE &Die) |
Computes the type signature. | |
void | update (uint8_t Value) |
Adds. | |
void | addULEB128 (uint64_t Value) |
Encodes and adds. | |
void | addSLEB128 (int64_t Value) |
Encodes and adds. |
An object containing the capability of hashing and adding hash attributes onto a DIE.
llvm::DIEHash::DIEHash | ( | AsmPrinter * | A = nullptr | ) | [inline] |
void DIEHash::addSLEB128 | ( | int64_t | Value | ) |
Encodes and adds.
Value | to the hash as a SLEB128. |
Definition at line 73 of file DIEHash.cpp.
References llvm::dbgs(), DEBUG, and llvm::MD5::update().
Referenced by llvm::HashingByteStreamer::EmitSLEB128().
void DIEHash::addULEB128 | ( | uint64_t | Value | ) |
Encodes and adds.
Adds the unsigned in Value
to the hash encoded as a ULEB128.
Value | to the hash as a ULEB128. |
Definition at line 62 of file DIEHash.cpp.
References llvm::dbgs(), DEBUG, and llvm::MD5::update().
Referenced by computeDIEODRSignature(), and llvm::HashingByteStreamer::EmitULEB128().
uint64_t DIEHash::computeCUSignature | ( | const DIE & | Die | ) |
Computes the CU signature.
This is based on the type signature computation given in section 7.27 of the DWARF4 standard. It is an md5 hash of the flattened description of the DIE with the inclusion of the full CU and all top level CU entities.
Definition at line 520 of file DIEHash.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::clear(), and llvm::MD5::final().
uint64_t DIEHash::computeDIEODRSignature | ( | const DIE & | Die | ) |
Computes the ODR signature.
This is based on the type signature computation given in section 7.27 of the DWARF4 standard. It is the md5 hash of a flattened description of the DIE with the exception that we are hashing only the context and the name of the type.
Definition at line 488 of file DIEHash.cpp.
References addULEB128(), llvm::dwarf::DW_AT_name, llvm::MD5::final(), getDIEStringAttr(), llvm::DIE::getParent(), and llvm::DIE::getTag().
uint64_t DIEHash::computeTypeSignature | ( | const DIE & | Die | ) |
Computes the type signature.
This is based on the type signature computation given in section 7.27 of the DWARF4 standard. It is an md5 hash of the flattened description of the DIE with the inclusion of additional forms not specifically called out in the standard.
Definition at line 541 of file DIEHash.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::clear(), llvm::MD5::final(), and llvm::DIE::getParent().
void llvm::DIEHash::update | ( | uint8_t | Value | ) | [inline] |
Adds.
Value | to the hash. |
Definition at line 117 of file DIEHash.h.
References llvm::MD5::update().
Referenced by llvm::HashingByteStreamer::EmitInt8().