diff options
author | Eric Christopher <echristo@gmail.com> | 2014-03-07 22:40:30 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-03-07 22:40:30 +0000 |
commit | a8d9fe22489601689d3757a6c9f4eadfeba729c7 (patch) | |
tree | 5486cd2fcb9e1558bed744febd0e7502b540b6c8 | |
parent | 32643e367388855b97f88bef2140cb9157b71212 (diff) | |
download | llvm-a8d9fe22489601689d3757a6c9f4eadfeba729c7.tar.gz llvm-a8d9fe22489601689d3757a6c9f4eadfeba729c7.tar.bz2 llvm-a8d9fe22489601689d3757a6c9f4eadfeba729c7.tar.xz |
Add include guards and make public a few routines that add values
to the hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203303 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIEHash.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.h b/lib/CodeGen/AsmPrinter/DIEHash.h index 40d6f44f31..c3db2d06ca 100644 --- a/lib/CodeGen/AsmPrinter/DIEHash.h +++ b/lib/CodeGen/AsmPrinter/DIEHash.h @@ -11,6 +11,9 @@ // //===----------------------------------------------------------------------===// +#ifndef CODEGEN_ASMPRINTER_DIEHASH_H__ +#define CODEGEN_ASMPRINTER_DIEHASH_H__ + #include "DIE.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Support/MD5.h" @@ -23,6 +26,7 @@ class CompileUnit; /// \brief An object containing the capability of hashing and adding hash /// attributes onto a DIE. class DIEHash { + // The entry for a particular attribute. struct AttrEntry { const DIEValue *Val; @@ -108,13 +112,17 @@ private: void computeHash(const DIE &Die); // Routines that add DIEValues to the hash. -private: +public: + /// \brief Adds \param Value to the hash. + void update(uint8_t Value) { Hash.update(Value); } + /// \brief Encodes and adds \param Value to the hash as a ULEB128. void addULEB128(uint64_t Value); /// \brief Encodes and adds \param Value to the hash as a SLEB128. void addSLEB128(int64_t Value); +private: /// \brief Adds \param Str to the hash and includes a NULL byte. void addString(StringRef Str); @@ -154,3 +162,5 @@ private: DenseMap<const DIE *, unsigned> Numbering; }; } + +#endif |