| OLD | NEW |
| 1 //===-- NaClBitcodeSubblockDist.h -----------------------------------------===// | 1 //===-- NaClBitcodeSubblockDist.h -----------------------------------------===// |
| 2 // Defines distribution maps for subblock values within an | 2 // Defines distribution maps for subblock values within an |
| 3 // (externally specified) block. | 3 // (externally specified) block. |
| 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 the notion subblock distribution map. Shows what subblocks appear | 12 // Defines the notion subblock distribution map. Shows what subblocks appear |
| 13 // within a given block (defined externally to the distribution map). | 13 // within a given block (defined externally to the distribution map). |
| 14 | 14 |
| 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H | 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H |
| 16 #define LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H | 16 #define LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H |
| 17 | 17 |
| 18 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" | 18 #include "llvm/Bitcode/NaCl/NaClBitcodeDist.h" |
| 19 | 19 |
| 20 namespace llvm { | 20 namespace llvm { |
| 21 | 21 |
| 22 /// Collects the distribution of subblocks within an (externally defined) | 22 /// Collects the distribution of subblocks within an (externally defined) |
| 23 /// block. | 23 /// block. |
| 24 class NaClBitcodeSubblockDistElement : public NaClBitcodeDistElement { | 24 class NaClBitcodeSubblockDistElement : public NaClBitcodeDistElement { |
| 25 NaClBitcodeSubblockDistElement(const NaClBitcodeSubblockDistElement &) | 25 NaClBitcodeSubblockDistElement(const NaClBitcodeSubblockDistElement &) |
| 26 LLVM_DELETED_FUNCTION; | 26 = delete; |
| 27 void operator=(const NaClBitcodeSubblockDistElement&); | 27 void operator=(const NaClBitcodeSubblockDistElement&); |
| 28 | 28 |
| 29 public: | 29 public: |
| 30 static bool classof(const NaClBitcodeDistElement *Element) { | 30 static bool classof(const NaClBitcodeDistElement *Element) { |
| 31 return Element->getKind() >= RDE_SubblockDist && | 31 return Element->getKind() >= RDE_SubblockDist && |
| 32 Element->getKind() < RDE_SubblockDistLast; | 32 Element->getKind() < RDE_SubblockDistLast; |
| 33 } | 33 } |
| 34 | 34 |
| 35 NaClBitcodeSubblockDistElement() | 35 NaClBitcodeSubblockDistElement() |
| 36 : NaClBitcodeDistElement(RDE_SubblockDist) {} | 36 : NaClBitcodeDistElement(RDE_SubblockDist) {} |
| 37 | 37 |
| 38 virtual ~NaClBitcodeSubblockDistElement(); | 38 virtual ~NaClBitcodeSubblockDistElement(); |
| 39 | 39 |
| 40 virtual NaClBitcodeDistElement *CreateElement( | 40 virtual NaClBitcodeDistElement *CreateElement( |
| 41 NaClBitcodeDistValue Value) const; | 41 NaClBitcodeDistValue Value) const; |
| 42 | 42 |
| 43 virtual const char *GetTitle() const; | 43 virtual const char *GetTitle() const; |
| 44 | 44 |
| 45 virtual const char *GetValueHeader() const; | 45 virtual const char *GetValueHeader() const; |
| 46 | 46 |
| 47 virtual void PrintRowValue(raw_ostream &Stream, | 47 virtual void PrintRowValue(raw_ostream &Stream, |
| 48 NaClBitcodeDistValue Value, | 48 NaClBitcodeDistValue Value, |
| 49 const NaClBitcodeDist *Distribution) const; | 49 const NaClBitcodeDist *Distribution) const; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 /// Collects the distribution of subblocks within an (externally | 52 /// Collects the distribution of subblocks within an (externally |
| 53 /// defined) block. Assumes distribution elements are instances of | 53 /// defined) block. Assumes distribution elements are instances of |
| 54 /// NaClBitcodeSubblockDistElement. | 54 /// NaClBitcodeSubblockDistElement. |
| 55 class NaClBitcodeSubblockDist : public NaClBitcodeDist { | 55 class NaClBitcodeSubblockDist : public NaClBitcodeDist { |
| 56 NaClBitcodeSubblockDist(const NaClBitcodeSubblockDist&) LLVM_DELETED_FUNCTION; | 56 NaClBitcodeSubblockDist(const NaClBitcodeSubblockDist&) = delete; |
| 57 void operator=(const NaClBitcodeSubblockDist&) LLVM_DELETED_FUNCTION; | 57 void operator=(const NaClBitcodeSubblockDist&) = delete; |
| 58 | 58 |
| 59 public: | 59 public: |
| 60 static bool classof(const NaClBitcodeDist *Dist) { | 60 static bool classof(const NaClBitcodeDist *Dist) { |
| 61 return Dist->getKind() >= RD_SubblockDist && | 61 return Dist->getKind() >= RD_SubblockDist && |
| 62 Dist->getKind() < RD_SubblockDistLast; | 62 Dist->getKind() < RD_SubblockDistLast; |
| 63 } | 63 } |
| 64 | 64 |
| 65 static NaClBitcodeSubblockDistElement DefaultSentinal; | 65 static NaClBitcodeSubblockDistElement DefaultSentinal; |
| 66 | 66 |
| 67 NaClBitcodeSubblockDist() | 67 NaClBitcodeSubblockDist() |
| 68 : NaClBitcodeDist(BlockStorage, &DefaultSentinal, RD_SubblockDist) | 68 : NaClBitcodeDist(BlockStorage, &DefaultSentinal, RD_SubblockDist) |
| 69 {} | 69 {} |
| 70 | 70 |
| 71 virtual ~NaClBitcodeSubblockDist(); | 71 virtual ~NaClBitcodeSubblockDist(); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } | 74 } |
| 75 | 75 |
| 76 #endif | 76 #endif |
| OLD | NEW |