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

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeHeader.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 //===-- llvm/Bitcode/NaCl/NaClBitcodeHeader.h - ----------------*- C++ -*-===// 1 //===-- llvm/Bitcode/NaCl/NaClBitcodeHeader.h - ----------------*- C++ -*-===//
2 // NaCl Bitcode header reader. 2 // NaCl 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 13 matching lines...) Expand all
24 24
25 namespace llvm { 25 namespace llvm {
26 class MemoryObject; 26 class MemoryObject;
27 27
28 // Class representing a variable-size metadata field in the bitcode header. 28 // Class representing a variable-size metadata field in the bitcode header.
29 // Also contains the list of known (typed) Tag IDs. 29 // Also contains the list of known (typed) Tag IDs.
30 // 30 //
31 // The serialized format has 2 fixed subfields (ID:type and data length) and the 31 // The serialized format has 2 fixed subfields (ID:type and data length) and the
32 // variable-length data subfield 32 // variable-length data subfield
33 class NaClBitcodeHeaderField { 33 class NaClBitcodeHeaderField {
34 NaClBitcodeHeaderField(const NaClBitcodeHeaderField &) LLVM_DELETED_FUNCTION; 34 NaClBitcodeHeaderField(const NaClBitcodeHeaderField &) = delete;
35 void operator=(const NaClBitcodeHeaderField &)LLVM_DELETED_FUNCTION; 35 void operator=(const NaClBitcodeHeaderField &) = delete;
36 36
37 public: 37 public:
38 // Defines the ID associated with the value. Valid values are in 38 // Defines the ID associated with the value. Valid values are in
39 // {0x0, ..., 0xFFF} 39 // {0x0, ..., 0xFFF}
40 typedef enum { 40 typedef enum {
41 kInvalid = 0, // KUnknownType. 41 kInvalid = 0, // KUnknownType.
42 kPNaClVersion = 1, // kUint32Type. 42 kPNaClVersion = 1, // kUint32Type.
43 kAlignBitcodeRecords = 2, // kFlagType. 43 kAlignBitcodeRecords = 2, // kFlagType.
44 kTag_MAX = kAlignBitcodeRecords 44 kTag_MAX = kAlignBitcodeRecords
45 } Tag; 45 } Tag;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 *Value = Buf[0] | Buf[1] << 8; 144 *Value = Buf[0] | Buf[1] << 8;
145 } 145 }
146 Tag ID; 146 Tag ID;
147 FieldType FType; 147 FieldType FType;
148 size_t Len; 148 size_t Len;
149 uint8_t *Data; 149 uint8_t *Data;
150 }; 150 };
151 151
152 /// \brief Class holding parsed header fields in PNaCl bitcode file. 152 /// \brief Class holding parsed header fields in PNaCl bitcode file.
153 class NaClBitcodeHeader { 153 class NaClBitcodeHeader {
154 NaClBitcodeHeader(const NaClBitcodeHeader &) LLVM_DELETED_FUNCTION; 154 NaClBitcodeHeader(const NaClBitcodeHeader &) = delete;
155 void operator=(const NaClBitcodeHeader &) LLVM_DELETED_FUNCTION; 155 void operator=(const NaClBitcodeHeader &) = delete;
156 156
157 // The set of parsed header fields. The header takes ownership of 157 // The set of parsed header fields. The header takes ownership of
158 // all fields in this vector. 158 // all fields in this vector.
159 std::vector<NaClBitcodeHeaderField *> Fields; 159 std::vector<NaClBitcodeHeaderField *> Fields;
160 // The number of bytes in the PNaCl header. 160 // The number of bytes in the PNaCl header.
161 size_t HeaderSize; 161 size_t HeaderSize;
162 // String defining why it is unsupported (if unsupported). 162 // String defining why it is unsupported (if unsupported).
163 std::string UnsupportedMessage; 163 std::string UnsupportedMessage;
164 // Flag defining if header is supported. 164 // Flag defining if header is supported.
165 bool IsSupportedFlag; 165 bool IsSupportedFlag;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool UnsupportedError(StringRef Message) { 254 bool UnsupportedError(StringRef Message) {
255 UnsupportedMessage = Message.str(); 255 UnsupportedMessage = Message.str();
256 return true; 256 return true;
257 } 257 }
258 258
259 }; 259 };
260 260
261 } // namespace llvm 261 } // namespace llvm
262 262
263 #endif 263 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698