diff options
author | Dan Gohman <gohman@apple.com> | 2010-09-13 18:00:48 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-09-13 18:00:48 +0000 |
commit | bbcd04dbcc6a61d6c8b5e594cd00110d747b2882 (patch) | |
tree | 84f464d8c7baf96b1af87f4ec2c2e44ee1857449 /llvm/lib/Bitcode/Reader/BitcodeReader.h | |
parent | c237a849e3056bd20786457d50721acb059c0200 (diff) | |
download | llvm-bbcd04dbcc6a61d6c8b5e594cd00110d747b2882.zip llvm-bbcd04dbcc6a61d6c8b5e594cd00110d747b2882.tar.gz llvm-bbcd04dbcc6a61d6c8b5e594cd00110d747b2882.tar.bz2 |
Add full auto-upgrade support for LLVM 2.7 bitcode metadata.
llvm-svn: 113764
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h index a5ab5d2..053121b 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.h +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.h @@ -173,11 +173,18 @@ class BitcodeReader : public GVMaterializer { /// are resolved lazily when functions are loaded. typedef std::pair<unsigned, GlobalVariable*> BlockAddrRefTy; DenseMap<Function*, std::vector<BlockAddrRefTy> > BlockAddrFwdRefs; + + /// LLVM2_7MetadataDetected - True if metadata produced by LLVM 2.7 or + /// earlier was detected, in which case we behave slightly differently, + /// for compatibility. + /// FIXME: Remove in LLVM 3.0. + bool LLVM2_7MetadataDetected; public: explicit BitcodeReader(MemoryBuffer *buffer, LLVMContext &C) : Context(C), TheModule(0), Buffer(buffer), BufferOwned(false), - ErrorString(0), ValueList(C), MDValueList(C) { + ErrorString(0), ValueList(C), MDValueList(C), + LLVM2_7MetadataDetected(false) { HasReversedFunctionsWithBodies = false; } ~BitcodeReader() { |