| OLD | NEW |
| 1 //===-- NaClAnalyzerBlockDist.h --------------------------------------------===/
/ | 1 //===-- NaClAnalyzerBlockDist.h --------------------------------------------===/
/ |
| 2 // Defines distribution maps used to collect block and record | 2 // Defines distribution maps used to collect block and record |
| 3 // distributions for tools pnacl-bcanalyzer. | 3 // distributions for tools pnacl-bcanalyzer. |
| 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 a block distribution, with nested subblock and record code | 12 // Defines a block distribution, with nested subblock and record code |
| 13 // distributions, to be collected during analysis. | 13 // distributions, to be collected during analysis. |
| 14 | 14 |
| 15 #ifndef LLVM_BITCODE_NACL_NACLANALYZERBLOCKDIST_H | 15 #ifndef LLVM_BITCODE_NACL_NACLANALYZERBLOCKDIST_H |
| 16 #define LLVM_BITCODE_NACL_NACLANALYZERBLOCKDIST_H | 16 #define LLVM_BITCODE_NACL_NACLANALYZERBLOCKDIST_H |
| 17 | 17 |
| 18 #include "llvm/Bitcode/NaCl/NaClBitcodeBlockDist.h" | 18 #include "llvm/Bitcode/NaCl/NaClBitcodeBlockDist.h" |
| 19 #include "llvm/Bitcode/NaCl/NaClBitcodeCodeDist.h" | 19 #include "llvm/Bitcode/NaCl/NaClBitcodeCodeDist.h" |
| 20 #include "llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h" | 20 #include "llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h" |
| 21 | 21 |
| 22 namespace llvm { | 22 namespace llvm { |
| 23 | 23 |
| 24 /// Holds block distribution, and nested subblock and record code distributions, | 24 /// Holds block distribution, and nested subblock and record code distributions, |
| 25 /// to be collected during analysis. | 25 /// to be collected during analysis. |
| 26 class NaClAnalyzerBlockDistElement : public NaClBitcodeBlockDistElement { | 26 class NaClAnalyzerBlockDistElement : public NaClBitcodeBlockDistElement { |
| 27 NaClAnalyzerBlockDistElement(const NaClAnalyzerBlockDistElement&) | 27 NaClAnalyzerBlockDistElement(const NaClAnalyzerBlockDistElement&) = delete; |
| 28 LLVM_DELETED_FUNCTION; | 28 void operator=(const NaClAnalyzerBlockDistElement&) = delete; |
| 29 void operator=(const NaClAnalyzerBlockDistElement&) 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_NaClAnalBlockDist && | 32 return Element->getKind() >= RDE_NaClAnalBlockDist && |
| 34 Element->getKind() < RDE_NaClAnalBlockDistLast; | 33 Element->getKind() < RDE_NaClAnalBlockDistLast; |
| 35 } | 34 } |
| 36 | 35 |
| 37 explicit NaClAnalyzerBlockDistElement(unsigned BlockID=0, | 36 explicit NaClAnalyzerBlockDistElement(unsigned BlockID=0, |
| 38 bool OrderBlocksByID=false) | 37 bool OrderBlocksByID=false) |
| 39 : NaClBitcodeBlockDistElement(RDE_NaClAnalBlockDist), | 38 : NaClBitcodeBlockDistElement(RDE_NaClAnalBlockDist), |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 SmallVector<NaClBitcodeDist*, 2> NestedDists; | 75 SmallVector<NaClBitcodeDist*, 2> NestedDists; |
| 77 | 76 |
| 78 // If true, order (top-level) blocks by block ID instead of file | 77 // If true, order (top-level) blocks by block ID instead of file |
| 79 // size. | 78 // size. |
| 80 bool OrderBlocksByID; | 79 bool OrderBlocksByID; |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 /// Holds block distribution, and nested subblock and record code distributions, | 82 /// Holds block distribution, and nested subblock and record code distributions, |
| 84 /// to be collected during analysis. | 83 /// to be collected during analysis. |
| 85 class NaClAnalyzerBlockDist : public NaClBitcodeBlockDist { | 84 class NaClAnalyzerBlockDist : public NaClBitcodeBlockDist { |
| 86 NaClAnalyzerBlockDist(const NaClAnalyzerBlockDist&) LLVM_DELETED_FUNCTION; | 85 NaClAnalyzerBlockDist(const NaClAnalyzerBlockDist&) = delete; |
| 87 void operator=(const NaClAnalyzerBlockDist&) LLVM_DELETED_FUNCTION; | 86 void operator=(const NaClAnalyzerBlockDist&) = delete; |
| 88 public: | 87 public: |
| 89 NaClAnalyzerBlockDist(NaClAnalyzerBlockDistElement &Sentinel) | 88 NaClAnalyzerBlockDist(NaClAnalyzerBlockDistElement &Sentinel) |
| 90 : NaClBitcodeBlockDist(&Sentinel) | 89 : NaClBitcodeBlockDist(&Sentinel) |
| 91 {} | 90 {} |
| 92 | 91 |
| 93 virtual ~NaClAnalyzerBlockDist() {} | 92 virtual ~NaClAnalyzerBlockDist() {} |
| 94 | 93 |
| 95 virtual void AddRecord(const NaClBitcodeRecord &Record); | 94 virtual void AddRecord(const NaClBitcodeRecord &Record); |
| 96 | 95 |
| 97 virtual void AddBlock(const NaClBitcodeBlock &Block); | 96 virtual void AddBlock(const NaClBitcodeBlock &Block); |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 } | 99 } |
| 101 #endif | 100 #endif |
| OLD | NEW |