| OLD | NEW |
| 1 //===- NaClBitcodeBitsDist.h ------------------------------------*- C++ -*-===// | 1 //===- NaClBitcodeBitsDist.h ------------------------------------*- C++ -*-===// |
| 2 // Maps distributions of values and corresponding number of | 2 // Maps distributions of values and corresponding number of |
| 3 // bits in PNaCl bitcode records. | 3 // bits in PNaCl bitcode records. |
| 4 // | 4 // |
| 5 // The LLVM Compiler Infrastructure | 5 // The LLVM Compiler Infrastructure |
| 6 // | 6 // |
| 7 // This file is distributed under the University of Illinois Open Source | 7 // This file is distributed under the University of Illinois Open Source |
| 8 // License. See LICENSE.TXT for details. | 8 // License. See LICENSE.TXT for details. |
| 9 // | 9 // |
| 10 //===----------------------------------------------------------------------===// | 10 //===----------------------------------------------------------------------===// |
| 11 // | 11 // |
| 12 // Creates a (nestable) distribution map of values, and the correspdonding | 12 // Creates a (nestable) distribution map of values, and the correspdonding |
| 13 // bits, in PNaCl bitcode records. These distributions are built directly | 13 // bits, in PNaCl bitcode records. These distributions are built directly |
| 14 // on top of the NaClBitcodeDistElement class. | 14 // on top of the NaClBitcodeDistElement class. |
| 15 | 15 |
| 16 #ifndef LLVM_BITCODE_NACL_NACLBITCODEBITSDIST_H | 16 #ifndef LLVM_BITCODE_NACL_NACLBITCODEBITSDIST_H |
| 17 #define LLVM_BITCODE_NACL_NACLBITCODEBITSDIST_H | 17 #define LLVM_BITCODE_NACL_NACLBITCODEBITSDIST_H |
| 18 | 18 |
| 19 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" | 19 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" |
| 20 | 20 |
| 21 namespace llvm { | 21 namespace llvm { |
| 22 | 22 |
| 23 /// Defines the element type of a PNaCl bitcode distribution map when | 23 /// Defines the element type of a PNaCl bitcode distribution map when |
| 24 /// we want to count both the number of instances, and the number of | 24 /// we want to count both the number of instances, and the number of |
| 25 /// bits used by each record. Also tracks the number to times an | 25 /// bits used by each record. Also tracks the number to times an |
| 26 /// abbreviation was used to parse the corresponding record. | 26 /// abbreviation was used to parse the corresponding record. |
| 27 class NaClBitcodeBitsDistElement : public NaClBitcodeDistElement { | 27 class NaClBitcodeBitsDistElement : public NaClBitcodeDistElement { |
| 28 NaClBitcodeBitsDistElement(const NaClBitcodeBitsDistElement&) | 28 NaClBitcodeBitsDistElement(const NaClBitcodeBitsDistElement&) = delete; |
| 29 LLVM_DELETED_FUNCTION; | 29 void operator=(const NaClBitcodeBitsDistElement&) = delete; |
| 30 void operator=(const NaClBitcodeBitsDistElement&) | |
| 31 LLVM_DELETED_FUNCTION; | |
| 32 | 30 |
| 33 public: | 31 public: |
| 34 static bool classof(const NaClBitcodeDistElement *Dist) { | 32 static bool classof(const NaClBitcodeDistElement *Dist) { |
| 35 return Dist->getKind() >= RDE_BitsDist | 33 return Dist->getKind() >= RDE_BitsDist |
| 36 && Dist->getKind() < RDE_BitsDistLast; | 34 && Dist->getKind() < RDE_BitsDistLast; |
| 37 } | 35 } |
| 38 | 36 |
| 39 // Create an element with no instances. | 37 // Create an element with no instances. |
| 40 explicit NaClBitcodeBitsDistElement( | 38 explicit NaClBitcodeBitsDistElement( |
| 41 NaClBitcodeDistElementKind Kind=RDE_BitsDist) | 39 NaClBitcodeDistElementKind Kind=RDE_BitsDist) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 61 const NaClBitcodeDist *Distribution) const; | 59 const NaClBitcodeDist *Distribution) const; |
| 62 | 60 |
| 63 private: | 61 private: |
| 64 // Number of bits used to represent all instances of the value. | 62 // Number of bits used to represent all instances of the value. |
| 65 uint64_t TotalBits; | 63 uint64_t TotalBits; |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 } | 66 } |
| 69 | 67 |
| 70 #endif | 68 #endif |
| OLD | NEW |