| OLD | NEW |
| 1 //===-- NaClBitcodeAbbrevDist.h ---------------------------------------------===
// | 1 //===-- NaClBitcodeAbbrevDist.h ---------------------------------------------===
// |
| 2 // Defines distribution maps for abbreviations associated with | 2 // Defines distribution maps for abbreviations associated with |
| 3 // bitcode records. | 3 // 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 // Defines distribution maps for tracking abbreviations associated | 12 // Defines distribution maps for tracking abbreviations associated |
| 13 // with bitcode records. | 13 // with bitcode records. |
| 14 | 14 |
| 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODEABBREVDIST_H | 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODEABBREVDIST_H |
| 16 #define LLVM_BITCODE_NACL_NACLBITCODEABBREVDIST_H | 16 #define LLVM_BITCODE_NACL_NACLBITCODEABBREVDIST_H |
| 17 | 17 |
| 18 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" | 18 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" |
| 19 #include "llvm/Bitcode/NaCl/NaClCompressCodeDist.h" | 19 #include "llvm/Bitcode/NaCl/NaClCompressCodeDist.h" |
| 20 | 20 |
| 21 namespace llvm { | 21 namespace llvm { |
| 22 | 22 |
| 23 /// Collects the number of instances associated with a given abbreviation | 23 /// Collects the number of instances associated with a given abbreviation |
| 24 /// index of a bitcode record. Note: Uses naclbitc::UNABBREV_RECORD index | 24 /// index of a bitcode record. Note: Uses naclbitc::UNABBREV_RECORD index |
| 25 /// to denote bitcode records that did not use an abbreviation. | 25 /// to denote bitcode records that did not use an abbreviation. |
| 26 class NaClBitcodeAbbrevDistElement : public NaClBitcodeDistElement { | 26 class NaClBitcodeAbbrevDistElement : public NaClBitcodeDistElement { |
| 27 NaClBitcodeAbbrevDistElement(const NaClBitcodeAbbrevDistElement&) | 27 NaClBitcodeAbbrevDistElement(const NaClBitcodeAbbrevDistElement&) = delete; |
| 28 LLVM_DELETED_FUNCTION; | 28 void operator=(const NaClBitcodeAbbrevDistElement&) = delete; |
| 29 void operator=(const NaClBitcodeAbbrevDistElement&) LLVM_DELETED_FUNCTION; | |
| 30 | 29 |
| 31 public: | 30 public: |
| 32 static bool classof(const NaClBitcodeDistElement *Element) { | 31 static bool classof(const NaClBitcodeDistElement *Element) { |
| 33 return Element->getKind() >= RDE_AbbrevDist && | 32 return Element->getKind() >= RDE_AbbrevDist && |
| 34 Element->getKind() < RDE_AbbrevDistLast; | 33 Element->getKind() < RDE_AbbrevDistLast; |
| 35 } | 34 } |
| 36 | 35 |
| 37 explicit NaClBitcodeAbbrevDistElement(unsigned BlockID=0) | 36 explicit NaClBitcodeAbbrevDistElement(unsigned BlockID=0) |
| 38 : NaClBitcodeDistElement(RDE_AbbrevDist), | 37 : NaClBitcodeDistElement(RDE_AbbrevDist), |
| 39 CodeDist(BlockID, &NaClCompressCodeDistElement::Sentinel) { | 38 CodeDist(BlockID, &NaClCompressCodeDistElement::Sentinel) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 109 |
| 111 private: | 110 private: |
| 112 // The block id associated with the abbreviations in this | 111 // The block id associated with the abbreviations in this |
| 113 // distribution map. | 112 // distribution map. |
| 114 unsigned BlockID; | 113 unsigned BlockID; |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } | 116 } |
| 118 | 117 |
| 119 #endif | 118 #endif |
| OLD | NEW |