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

Side by Side Diff: lib/Bitcode/Reader/BitcodeReader.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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/Writer/NaClValueEnumerator.cpp ('k') | lib/Bitcode/Reader/BitcodeReader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- BitcodeReader.h - Internal BitcodeReader impl ------------*- C++ -*-===// 1 //===- BitcodeReader.h - Internal BitcodeReader impl ------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This header defines the BitcodeReader class. 10 // This header defines the BitcodeReader class.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 Value *getValueFwdRef(unsigned Idx); 123 Value *getValueFwdRef(unsigned Idx);
124 void AssignValue(Value *V, unsigned Idx); 124 void AssignValue(Value *V, unsigned Idx);
125 }; 125 };
126 126
127 class BitcodeReader : public GVMaterializer { 127 class BitcodeReader : public GVMaterializer {
128 LLVMContext &Context; 128 LLVMContext &Context;
129 Module *TheModule; 129 Module *TheModule;
130 std::unique_ptr<MemoryBuffer> Buffer; 130 std::unique_ptr<MemoryBuffer> Buffer;
131 std::unique_ptr<BitstreamReader> StreamFile; 131 std::unique_ptr<BitstreamReader> StreamFile;
132 BitstreamCursor Stream; 132 BitstreamCursor Stream;
133 DataStreamer *LazyStreamer; 133 StreamingMemoryObject *LazyStreamer; // @LOCALMOD
134 uint64_t NextUnreadBit; 134 uint64_t NextUnreadBit;
135 bool SeenValueSymbolTable; 135 bool SeenValueSymbolTable;
136 136
137 std::vector<Type*> TypeList; 137 std::vector<Type*> TypeList;
138 BitcodeReaderValueList ValueList; 138 BitcodeReaderValueList ValueList;
139 BitcodeReaderMDValueList MDValueList; 139 BitcodeReaderMDValueList MDValueList;
140 std::vector<Comdat *> ComdatList; 140 std::vector<Comdat *> ComdatList;
141 SmallVector<Instruction *, 64> InstructionList; 141 SmallVector<Instruction *, 64> InstructionList;
142 142
143 std::vector<std::pair<GlobalVariable*, unsigned> > GlobalInits; 143 std::vector<std::pair<GlobalVariable*, unsigned> > GlobalInits;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 SmallPtrSet<const Function *, 4> BlockAddressesTaken; 203 SmallPtrSet<const Function *, 4> BlockAddressesTaken;
204 204
205 public: 205 public:
206 std::error_code Error(BitcodeError E) { return make_error_code(E); } 206 std::error_code Error(BitcodeError E) { return make_error_code(E); }
207 207
208 explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext &C) 208 explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext &C)
209 : Context(C), TheModule(nullptr), Buffer(buffer), LazyStreamer(nullptr), 209 : Context(C), TheModule(nullptr), Buffer(buffer), LazyStreamer(nullptr),
210 NextUnreadBit(0), SeenValueSymbolTable(false), ValueList(C), 210 NextUnreadBit(0), SeenValueSymbolTable(false), ValueList(C),
211 MDValueList(C), SeenFirstFunctionBody(false), UseRelativeIDs(false), 211 MDValueList(C), SeenFirstFunctionBody(false), UseRelativeIDs(false),
212 WillMaterializeAllForwardRefs(false) {} 212 WillMaterializeAllForwardRefs(false) {}
213 explicit BitcodeReader(DataStreamer *streamer, LLVMContext &C) 213 // @LOCALMOD -- DataStreamer -> StreamingMemoryObject.
214 explicit BitcodeReader(StreamingMemoryObject *streamer, LLVMContext &C)
214 : Context(C), TheModule(nullptr), Buffer(nullptr), LazyStreamer(streamer), 215 : Context(C), TheModule(nullptr), Buffer(nullptr), LazyStreamer(streamer),
215 NextUnreadBit(0), SeenValueSymbolTable(false), ValueList(C), 216 NextUnreadBit(0), SeenValueSymbolTable(false), ValueList(C),
216 MDValueList(C), SeenFirstFunctionBody(false), UseRelativeIDs(false), 217 MDValueList(C), SeenFirstFunctionBody(false), UseRelativeIDs(false),
217 WillMaterializeAllForwardRefs(false) {} 218 WillMaterializeAllForwardRefs(false) {}
218 ~BitcodeReader() { FreeState(); } 219 ~BitcodeReader() { FreeState(); }
219 220
220 std::error_code materializeForwardReferencedFunctions(); 221 std::error_code materializeForwardReferencedFunctions();
221 222
222 void FreeState(); 223 void FreeState();
223 224
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 std::error_code InitStreamFromBuffer(); 343 std::error_code InitStreamFromBuffer();
343 std::error_code InitLazyStream(); 344 std::error_code InitLazyStream();
344 std::error_code FindFunctionInStream( 345 std::error_code FindFunctionInStream(
345 Function *F, 346 Function *F,
346 DenseMap<Function *, uint64_t>::iterator DeferredFunctionInfoIterator); 347 DenseMap<Function *, uint64_t>::iterator DeferredFunctionInfoIterator);
347 }; 348 };
348 349
349 } // End llvm namespace 350 } // End llvm namespace
350 351
351 #endif 352 #endif
OLDNEW
« no previous file with comments | « lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp ('k') | lib/Bitcode/Reader/BitcodeReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698