summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-07 20:18:58 +0000
committerOwen Anderson <resistor@mac.com>2009-07-07 20:18:58 +0000
commit74a77812d1785ad6c62226c52dcd4d129b3cdd0b (patch)
treef73f5788840c9136ae649fbad46808c94853548c /lib/Bitcode/Reader/BitcodeReader.h
parentf667e7ed185929929ebf8e2b901a1e4230497002 (diff)
downloadllvm-74a77812d1785ad6c62226c52dcd4d129b3cdd0b.tar.gz
llvm-74a77812d1785ad6c62226c52dcd4d129b3cdd0b.tar.bz2
llvm-74a77812d1785ad6c62226c52dcd4d129b3cdd0b.tar.xz
LLVMContext-ify the bitcode reader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h
index 662631bce9..bbbe4ec43a 100644
--- a/lib/Bitcode/Reader/BitcodeReader.h
+++ b/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() {