aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-09-13 18:00:48 +0000
committerDan Gohman <gohman@apple.com>2010-09-13 18:00:48 +0000
commit9b10dfb7d6ffb0e4466f908cd7d18212a45cfdac (patch)
tree17c88de375705ab30dd913af2bf2b982cef2120f /lib/Bitcode/Reader/BitcodeReader.h
parent2c5f19db2eef055d2a65482504ae98e79f2ca24d (diff)
Add full auto-upgrade support for LLVM 2.7 bitcode metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h
index a5ab5d29e9..053121bdad 100644
--- a/lib/Bitcode/Reader/BitcodeReader.h
+++ b/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() {