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

Side by Side Diff: lib/Bitcode/NaCl/Analysis/NaClBitcodeAbbrevDist.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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
(Empty)
1 //===-- NaClBitcodeAbbrevDist.cpp -------------------------------------------=== //
2 // Implements distribution maps for abbreviations associated with
3 // bitcode records.
4 //
5 // The LLVM Compiler Infrastructure
6 //
7 // This file is distributed under the University of Illinois Open Source
8 // License. See LICENSE.TXT for details.
9 //
10 //===----------------------------------------------------------------------===//
11
12 #include "llvm/Bitcode/NaCl/NaClBitcodeAbbrevDist.h"
13
14 using namespace llvm;
15
16 NaClBitcodeAbbrevDistElement::~NaClBitcodeAbbrevDistElement() {}
17
18 NaClBitcodeDistElement *NaClBitcodeAbbrevDistElement::CreateElement(
19 NaClBitcodeDistValue Value) const {
20 return new NaClBitcodeAbbrevDistElement();
21 }
22
23 void NaClBitcodeAbbrevDistElement::
24 GetValueList(const NaClBitcodeRecord &Record,
25 ValueListType &ValueList) const {
26 ValueList.push_back(Record.GetAbbreviationIndex());
27 }
28
29 void NaClBitcodeAbbrevDistElement::AddRecord(const NaClBitcodeRecord &Record) {
30 NaClBitcodeDistElement::AddRecord(Record);
31 CodeDist.AddRecord(Record);
32 }
33
34 const char *NaClBitcodeAbbrevDistElement::GetTitle() const {
35 return "Abbreviation Indices";
36 }
37
38 const char *NaClBitcodeAbbrevDistElement::GetValueHeader() const {
39 return " Index";
40 }
41
42 void NaClBitcodeAbbrevDistElement::
43 PrintRowValue(raw_ostream &Stream,
44 NaClBitcodeDistValue Value,
45 const NaClBitcodeDist *Distribution) const {
46 Stream << format("%7u", Value);
47 }
48
49 const SmallVectorImpl<NaClBitcodeDist*> *NaClBitcodeAbbrevDistElement::
50 GetNestedDistributions() const {
51 return &NestedDists;
52 }
53
54 NaClBitcodeAbbrevDistElement NaClBitcodeAbbrevDistElement::Sentinel;
55
56 NaClBitcodeAbbrevDist::~NaClBitcodeAbbrevDist() {}
57
58 NaClBitcodeDistElement* NaClBitcodeAbbrevDist::
59 CreateElement(NaClBitcodeDistValue Value) const {
60 return new NaClBitcodeAbbrevDistElement(BlockID);
61 }
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClAnalyzerBlockDist.cpp ('k') | lib/Bitcode/NaCl/Analysis/NaClBitcodeAnalyzer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698