mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 15:36:21 +00:00
0d27ca145f
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188028 91177308-0d34-0410-b5e6-96231b3b80d8
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
//===-- llvm/CodeGen/DIEHash.h - Dwarf Hashing Framework -------*- C++ -*--===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains support for DWARF4 hashing of DIEs.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/MD5.h"
|
|
|
|
namespace llvm {
|
|
|
|
class CompileUnit;
|
|
|
|
/// \brief An object containing the capability of hashing and adding hash
|
|
/// attributes onto a DIE.
|
|
class DIEHash {
|
|
public:
|
|
/// \brief Initializes. The hash is default initialized.
|
|
DIEHash() {}
|
|
|
|
/// \brief Computes the ODR signature
|
|
uint64_t computeDIEODRSignature(DIE *Die);
|
|
|
|
// Helper routines to process parts of a DIE.
|
|
private:
|
|
/// \brief Adds the parent context of \param Die to the hash.
|
|
void addParentContext(DIE *Die);
|
|
|
|
// Routines that add DIEValues to the hash.
|
|
private:
|
|
/// \brief Encodes and adds \param Value to the hash as a ULEB128.
|
|
void addULEB128(uint64_t Value);
|
|
|
|
/// \brief Adds \param Str to the hash and includes a NULL byte.
|
|
void addString(StringRef Str);
|
|
|
|
private:
|
|
MD5 Hash;
|
|
};
|
|
}
|