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

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeDist.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 //===- NaClBitcodeDist.h ---------------------------------------*- C++ -*-===// 1 //===- NaClBitcodeDist.h ---------------------------------------*- C++ -*-===//
2 // Maps distributions of values in PNaCl bitcode files. 2 // Maps distributions of values in PNaCl bitcode files.
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 //
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 /// values. 179 /// values.
180 typedef std::vector<NaClBitcodeDistValue> ValueListType; 180 typedef std::vector<NaClBitcodeDistValue> ValueListType;
181 181
182 typedef ValueListType::const_iterator ValueListIterator; 182 typedef ValueListType::const_iterator ValueListIterator;
183 183
184 /// Defines a PNaCl bitcode record distribution map. The distribution 184 /// Defines a PNaCl bitcode record distribution map. The distribution
185 /// map is a map from a (record) value, to the corresponding data 185 /// map is a map from a (record) value, to the corresponding data
186 /// associated with that value. Assumes distributions elements are 186 /// associated with that value. Assumes distributions elements are
187 /// instances of NaClBitcodeDistElement. 187 /// instances of NaClBitcodeDistElement.
188 class NaClBitcodeDist { 188 class NaClBitcodeDist {
189 NaClBitcodeDist(const NaClBitcodeDist&) LLVM_DELETED_FUNCTION; 189 NaClBitcodeDist(const NaClBitcodeDist&) = delete;
190 void operator=(const NaClBitcodeDist&) LLVM_DELETED_FUNCTION; 190 void operator=(const NaClBitcodeDist&) = delete;
191 friend class NaClBitcodeDistElement; 191 friend class NaClBitcodeDistElement;
192 192
193 public: 193 public:
194 /// Define kinds for isa, dyn_cast, etc. support (see 194 /// Define kinds for isa, dyn_cast, etc. support (see
195 /// llvm/Support/Casting.h). Only defined for concrete classes. 195 /// llvm/Support/Casting.h). Only defined for concrete classes.
196 enum NaClBitcodeDistKind { 196 enum NaClBitcodeDistKind {
197 RD_Dist, // class NaClBitcodeDist. 197 RD_Dist, // class NaClBitcodeDist.
198 RD_BlockDist, // class NaClBitcodeBlockDist. 198 RD_BlockDist, // class NaClBitcodeBlockDist.
199 RD_BlockDistLast, 199 RD_BlockDistLast,
200 RD_CodeDist, // class NaClBitcodeCodeDist. 200 RD_CodeDist, // class NaClBitcodeCodeDist.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // The total number of instances in the map. 351 // The total number of instances in the map.
352 unsigned Total; 352 unsigned Total;
353 }; 353 };
354 354
355 /// Defines the element type of a PNaCl bitcode distribution map. 355 /// Defines the element type of a PNaCl bitcode distribution map.
356 /// This is the base class for all element types used in 356 /// This is the base class for all element types used in
357 /// NaClBitcodeDist. By default, only the number of instances 357 /// NaClBitcodeDist. By default, only the number of instances
358 /// of the corresponding distribution values is recorded. 358 /// of the corresponding distribution values is recorded.
359 class NaClBitcodeDistElement { 359 class NaClBitcodeDistElement {
360 NaClBitcodeDistElement(const NaClBitcodeDistElement &) 360 NaClBitcodeDistElement(const NaClBitcodeDistElement &)
361 LLVM_DELETED_FUNCTION; 361 = delete;
362 void operator=(const NaClBitcodeDistElement &) 362 void operator=(const NaClBitcodeDistElement &)
363 LLVM_DELETED_FUNCTION; 363 = delete;
jvoung (off chromium) 2015/05/26 20:39:45 nit: might be able to fit the = delete on the same
Derek Schuff 2015/05/26 22:01:32 Done.
364 364
365 public: 365 public:
366 /// Define kinds for isa, dyn_cast, etc. support. Only defined 366 /// Define kinds for isa, dyn_cast, etc. support. Only defined
367 /// for concrete classes. 367 /// for concrete classes.
368 enum NaClBitcodeDistElementKind { 368 enum NaClBitcodeDistElementKind {
369 RDE_Dist, // class NaClBitcodeDistElement. 369 RDE_Dist, // class NaClBitcodeDistElement.
370 RDE_AbbrevDist, // class NaClBitcodeAbbrevDistElement. 370 RDE_AbbrevDist, // class NaClBitcodeAbbrevDistElement.
371 RDE_AbbrevDistLast, 371 RDE_AbbrevDistLast,
372 RDE_BitsDist, // class NaClBitcodeBitsDistElement. 372 RDE_BitsDist, // class NaClBitcodeBitsDistElement.
373 RDE_BitsAndAbbrevsDist, // class NaClBitcodeBitsAndAbbrevsDistElement. 373 RDE_BitsAndAbbrevsDist, // class NaClBitcodeBitsAndAbbrevsDistElement.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 GetElement(NaClBitcodeDistValue Value) { 498 GetElement(NaClBitcodeDistValue Value) {
499 if (TableMap.find(Value) == TableMap.end()) { 499 if (TableMap.find(Value) == TableMap.end()) {
500 TableMap[Value] = CreateElement(Value); 500 TableMap[Value] = CreateElement(Value);
501 } 501 }
502 return TableMap[Value]; 502 return TableMap[Value];
503 } 503 }
504 504
505 } 505 }
506 506
507 #endif 507 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698