| OLD | NEW |
| 1 //===- NaClBitcodeBitsAndAbbrevsDist.h --------------------*- C++ -*-===// | 1 //===- NaClBitcodeBitsAndAbbrevsDist.h --------------------*- C++ -*-===// |
| 2 // Maps distributions of values with corresponding number of bits, | 2 // Maps distributions of values with corresponding number of bits, |
| 3 // and percentage of abbreviations used in PNaCl bitcode records. | 3 // and percentage of abbreviations used 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 distribution map of values and the | 12 // Creates a distribution map of values and the |
| 13 // correspdonding bits and abbreviations in PNaCl bitcode records. | 13 // correspdonding bits and abbreviations in PNaCl bitcode records. |
| 14 | 14 |
| 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODEBITSANDABBREVSDIST_H | 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODEBITSANDABBREVSDIST_H |
| 16 #define LLVM_BITCODE_NACL_NACLBITCODEBITSANDABBREVSDIST_H | 16 #define LLVM_BITCODE_NACL_NACLBITCODEBITSANDABBREVSDIST_H |
| 17 | 17 |
| 18 #include "llvm/Bitcode/NaCl/NaClBitcodeBitsDist.h" | 18 #include "llvm/Bitcode/NaCl/NaClBitcodeBitsDist.h" |
| 19 | 19 |
| 20 namespace llvm { | 20 namespace llvm { |
| 21 | 21 |
| 22 /// Defines the element type of a PNaCl bitcode distribution map when | 22 /// Defines the element type of a PNaCl bitcode distribution map when |
| 23 /// we want to count both the number of instances, and the number of | 23 /// we want to count both the number of instances, and the number of |
| 24 /// bits used by each record. Also tracks the number to times an | 24 /// bits used by each record. Also tracks the number to times an |
| 25 /// abbreviation was used to parse the corresponding record. | 25 /// abbreviation was used to parse the corresponding record. |
| 26 class NaClBitcodeBitsAndAbbrevsDistElement : public NaClBitcodeBitsDistElement { | 26 class NaClBitcodeBitsAndAbbrevsDistElement : public NaClBitcodeBitsDistElement { |
| 27 NaClBitcodeBitsAndAbbrevsDistElement( | 27 NaClBitcodeBitsAndAbbrevsDistElement( |
| 28 const NaClBitcodeBitsAndAbbrevsDistElement&) LLVM_DELETED_FUNCTION; | 28 const NaClBitcodeBitsAndAbbrevsDistElement&) = delete; |
| 29 void operator=(const NaClBitcodeBitsAndAbbrevsDistElement&) | 29 void operator=(const NaClBitcodeBitsAndAbbrevsDistElement&) = delete; |
| 30 LLVM_DELETED_FUNCTION; | |
| 31 | 30 |
| 32 public: | 31 public: |
| 33 static bool classof(const NaClBitcodeDistElement *Dist) { | 32 static bool classof(const NaClBitcodeDistElement *Dist) { |
| 34 return Dist->getKind() >= RDE_BitsAndAbbrevsDist | 33 return Dist->getKind() >= RDE_BitsAndAbbrevsDist |
| 35 && Dist->getKind() < RDE_BitsAndAbbrevsDistLast; | 34 && Dist->getKind() < RDE_BitsAndAbbrevsDistLast; |
| 36 } | 35 } |
| 37 | 36 |
| 38 // Create an element with no instances. | 37 // Create an element with no instances. |
| 39 explicit NaClBitcodeBitsAndAbbrevsDistElement( | 38 explicit NaClBitcodeBitsAndAbbrevsDistElement( |
| 40 NaClBitcodeDistElementKind Kind=RDE_BitsAndAbbrevsDist) | 39 NaClBitcodeDistElementKind Kind=RDE_BitsAndAbbrevsDist) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 61 const NaClBitcodeDist *Distribution) const; | 60 const NaClBitcodeDist *Distribution) const; |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 // Number of times an abbreviation is used for the value. | 63 // Number of times an abbreviation is used for the value. |
| 65 unsigned NumAbbrevs; | 64 unsigned NumAbbrevs; |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 } | 67 } |
| 69 | 68 |
| 70 #endif | 69 #endif |
| OLD | NEW |