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

Side by Side Diff: lib/Bitcode/NaCl/Reader/NaClBitCodes.cpp

Issue 867013002: Fix more build warnings (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- NaClBitcodeHeader.cpp ----------------------------------------------===// 1 //===- NaClBitcodeHeader.cpp ----------------------------------------------===//
2 // PNaCl bitcode header reader. 2 // PNaCl bitcode header reader.
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 switch (NaClBitCodeAbbrevOp::Encoding(E)) { 47 switch (NaClBitCodeAbbrevOp::Encoding(E)) {
48 case Literal: 48 case Literal:
49 return true; 49 return true;
50 case Fixed: 50 case Fixed:
51 case VBR: 51 case VBR:
52 return Val <= naclbitc::MaxAbbrevWidth; 52 return Val <= naclbitc::MaxAbbrevWidth;
53 case Char6: 53 case Char6:
54 case Array: 54 case Array:
55 return Val == 0; 55 return Val == 0;
56 } 56 }
57 llvm_unreachable("unhandled abbreviation");
57 } 58 }
58 59
59 void NaClBitCodeAbbrevOp::Print(raw_ostream& Stream) const { 60 void NaClBitCodeAbbrevOp::Print(raw_ostream& Stream) const {
60 if (Enc == Literal) { 61 if (Enc == Literal) {
61 Stream << getValue(); 62 Stream << getValue();
62 return; 63 return;
63 } 64 }
64 Stream << getEncodingName(Enc); 65 Stream << getEncodingName(Enc);
65 if (!hasValue()) 66 if (!hasValue())
66 return; 67 return;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Verify that an array op appears can only appear if it is the 120 // Verify that an array op appears can only appear if it is the
120 // second to last element. 121 // second to last element.
121 unsigned NumOperands = getNumOperandInfos(); 122 unsigned NumOperands = getNumOperandInfos();
122 for (unsigned i = 0; i < NumOperands; ++i) { 123 for (unsigned i = 0; i < NumOperands; ++i) {
123 const NaClBitCodeAbbrevOp &Op = getOperandInfo(i); 124 const NaClBitCodeAbbrevOp &Op = getOperandInfo(i);
124 if (Op.isArrayOp() && i + 2 != NumOperands) 125 if (Op.isArrayOp() && i + 2 != NumOperands)
125 return false; 126 return false;
126 } 127 }
127 return true; 128 return true;
128 } 129 }
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Analysis/NaClObjDump.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698