| OLD | NEW | 
|---|
| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 305   virtual void AddRecord(const NaClBitcodeRecord &Record); | 305   virtual void AddRecord(const NaClBitcodeRecord &Record); | 
| 306 | 306 | 
| 307   /// Adds the BlockID of the given bitcode block to the distribution | 307   /// Adds the BlockID of the given bitcode block to the distribution | 
| 308   /// map, if applicable (based on the value of method UseBlockID). | 308   /// map, if applicable (based on the value of method UseBlockID). | 
| 309   /// Note: Requires that GetStorageKind() == BlockStorage. | 309   /// Note: Requires that GetStorageKind() == BlockStorage. | 
| 310   virtual void AddBlock(const NaClBitcodeBlock &Block); | 310   virtual void AddBlock(const NaClBitcodeBlock &Block); | 
| 311 | 311 | 
| 312   /// Builds the distribution associated with the distribution map. | 312   /// Builds the distribution associated with the distribution map. | 
| 313   /// Warning: The distribution is cached, and hence, only valid while | 313   /// Warning: The distribution is cached, and hence, only valid while | 
| 314   /// it's contents is not changed. | 314   /// it's contents is not changed. | 
| 315   Distribution *GetDistribution() const { | 315   const Distribution *GetDistribution() const { | 
| 316     if (CachedDistribution == 0) Sort(); | 316     if (CachedDistribution == 0) Sort(); | 
| 317     return CachedDistribution; | 317     return CachedDistribution; | 
| 318   } | 318   } | 
| 319 | 319 | 
| 320   /// Prints out the contents of the distribution map to Stream. | 320   /// Prints out the contents of the distribution map to Stream. | 
| 321   void Print(raw_ostream &Stream, const std::string &Indent) const; | 321   void Print(raw_ostream &Stream, const std::string &Indent) const; | 
| 322 | 322 | 
| 323   void Print(raw_ostream &Stream) const { | 323   void Print(raw_ostream &Stream) const { | 
| 324     std::string Indent; | 324     std::string Indent; | 
| 325     Print(Stream, Indent); | 325     Print(Stream, Indent); | 
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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 | 
| OLD | NEW | 
|---|