diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-07 20:18:58 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-07 20:18:58 +0000 |
commit | e9f98047623959176f351d2001f2e8c10eb8b728 (patch) | |
tree | 64340114c8bc1ae499ea4ce474bdf9d0a90ec5a5 /llvm/lib/Bitcode/Reader/BitcodeReader.h | |
parent | 628af7a4bc22b31397c6ac6c0920634f6f8b7175 (diff) | |
download | bcm5719-llvm-e9f98047623959176f351d2001f2e8c10eb8b728.tar.gz bcm5719-llvm-e9f98047623959176f351d2001f2e8c10eb8b728.zip |
LLVMContext-ify the bitcode reader.
llvm-svn: 74942
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h index 662631bce95..bbbe4ec43a2 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.h +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.h @@ -44,8 +44,9 @@ class BitcodeReaderValueList { /// number that holds the resolved value. typedef std::vector<std::pair<Constant*, unsigned> > ResolveConstantsTy; ResolveConstantsTy ResolveConstants; + LLVMContext& Context; public: - BitcodeReaderValueList() {} + BitcodeReaderValueList(LLVMContext& C) : Context(C) {} ~BitcodeReaderValueList() { assert(ResolveConstants.empty() && "Constants not resolved?"); } @@ -126,7 +127,7 @@ class BitcodeReader : public ModuleProvider { DenseMap<Function*, std::pair<uint64_t, unsigned> > DeferredFunctionInfo; public: explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext& C) - : Context(C), Buffer(buffer), ErrorString(0) { + : Context(C), Buffer(buffer), ErrorString(0), ValueList(C) { HasReversedFunctionsWithBodies = false; } ~BitcodeReader() { |