[llvm] r203303 - Add include guards and make public a few routines that add values

Eric Christopher echristo at gmail.com
Fri Mar 7 14:40:31 PST 2014


Author: echristo
Date: Fri Mar  7 16:40:30 2014
New Revision: 203303

URL: http://llvm.org/viewvc/llvm-project?rev=203303&view=rev
Log:
Add include guards and make public a few routines that add values
to the hash.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h?rev=203303&r1=203302&r2=203303&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIEHash.h Fri Mar  7 16:40:30 2014
@@ -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





More information about the llvm-commits mailing list