Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeCodeDist.h

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===-- NaClBitcodeCodeDist.h ---------------------------------------------===// 1 //===-- NaClBitcodeCodeDist.h ---------------------------------------------===//
2 // Defines distribution maps for various values in bitcode records. 2 // Defines distribution maps for various values in bitcode records.
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is distributed under the University of Illinois Open Source 6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details. 7 // License. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
11 // Defines simple (non-nested) distribution maps for record codes 11 // Defines simple (non-nested) distribution maps for record codes
12 // appearing in bitcode records (instances of class NaClBitcodeRecord 12 // appearing in bitcode records (instances of class NaClBitcodeRecord
13 // in NaClBitcodeParser.h). 13 // in NaClBitcodeParser.h).
14 14
15 #ifndef LLVM_BITCODE_NACL_NACLBITCODECODEDIST_H 15 #ifndef LLVM_BITCODE_NACL_NACLBITCODECODEDIST_H
16 #define LLVM_BITCODE_NACL_NACLBITCODECODEDIST_H 16 #define LLVM_BITCODE_NACL_NACLBITCODECODEDIST_H
17 17
18 #include "llvm/Bitcode/NaCl/NaClBitcodeBitsAndAbbrevsDist.h" 18 #include "llvm/Bitcode/NaCl/NaClBitcodeBitsAndAbbrevsDist.h"
19 19
20 namespace llvm { 20 namespace llvm {
21 21
22 // Collects the distribution of record codes/number of bits used for a 22 // Collects the distribution of record codes/number of bits used for a
23 // particular blockID and Code ID. 23 // particular blockID and Code ID.
24 class NaClBitcodeCodeDistElement 24 class NaClBitcodeCodeDistElement
25 : public NaClBitcodeBitsAndAbbrevsDistElement { 25 : public NaClBitcodeBitsAndAbbrevsDistElement {
26 NaClBitcodeCodeDistElement(const NaClBitcodeCodeDistElement&) 26 NaClBitcodeCodeDistElement(const NaClBitcodeCodeDistElement&)
27 LLVM_DELETED_FUNCTION; 27 = delete;
28 void operator=(const NaClBitcodeCodeDistElement&) 28 void operator=(const NaClBitcodeCodeDistElement&)
29 LLVM_DELETED_FUNCTION; 29 = delete;
30 30
31 public: 31 public:
32 static bool classof(const NaClBitcodeDistElement *Element) { 32 static bool classof(const NaClBitcodeDistElement *Element) {
33 return Element->getKind() >= RDE_CodeDist 33 return Element->getKind() >= RDE_CodeDist
34 && Element->getKind() < RDE_CodeDistLast; 34 && Element->getKind() < RDE_CodeDistLast;
35 } 35 }
36 36
37 explicit NaClBitcodeCodeDistElement( 37 explicit NaClBitcodeCodeDistElement(
38 NaClBitcodeDistElementKind Kind=RDE_CodeDist) 38 NaClBitcodeDistElementKind Kind=RDE_CodeDist)
39 : NaClBitcodeBitsAndAbbrevsDistElement(Kind) 39 : NaClBitcodeBitsAndAbbrevsDistElement(Kind)
(...skipping 13 matching lines...) Expand all
53 53
54 virtual void PrintRowValue(raw_ostream &Stream, 54 virtual void PrintRowValue(raw_ostream &Stream,
55 NaClBitcodeDistValue Value, 55 NaClBitcodeDistValue Value,
56 const NaClBitcodeDist *Distribution) const; 56 const NaClBitcodeDist *Distribution) const;
57 }; 57 };
58 58
59 // Collects the distribution of record codes/number of bits used for a 59 // Collects the distribution of record codes/number of bits used for a
60 // particular blockID. Assumes distribution elements are instances of 60 // particular blockID. Assumes distribution elements are instances of
61 // NaClBitcodeCodeDistElement. 61 // NaClBitcodeCodeDistElement.
62 class NaClBitcodeCodeDist : public NaClBitcodeDist { 62 class NaClBitcodeCodeDist : public NaClBitcodeDist {
63 NaClBitcodeCodeDist(const NaClBitcodeCodeDist&) 63 NaClBitcodeCodeDist(const NaClBitcodeCodeDist&) = delete;
64 LLVM_DELETED_FUNCTION; 64 void operator=(const NaClBitcodeCodeDist&) = delete;
65 void operator=(const NaClBitcodeCodeDist&)
66 LLVM_DELETED_FUNCTION;
67 65
68 public: 66 public:
69 static bool classof(const NaClBitcodeDist *Dist) { 67 static bool classof(const NaClBitcodeDist *Dist) {
70 return Dist->getKind() >= RD_CodeDist 68 return Dist->getKind() >= RD_CodeDist
71 && Dist->getKind() < RD_CodeDistLast; 69 && Dist->getKind() < RD_CodeDistLast;
72 } 70 }
73 71
74 protected: 72 protected:
75 NaClBitcodeCodeDist(NaClBitcodeDistElement *Sentinal, 73 NaClBitcodeCodeDist(NaClBitcodeDistElement *Sentinal,
76 unsigned BlockID, 74 unsigned BlockID,
(...skipping 27 matching lines...) Expand all
104 102
105 private: 103 private:
106 // The blockID associated with the record code distribution. 104 // The blockID associated with the record code distribution.
107 // Used so that we can look up the print name for each record code. 105 // Used so that we can look up the print name for each record code.
108 unsigned BlockID; 106 unsigned BlockID;
109 }; 107 };
110 108
111 } 109 }
112 110
113 #endif 111 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698