From 5d5cc59cc77afe655b3707cb0e69e0827b444cad Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:48:55 +0000 Subject: Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) --- lib/Bitcode/Reader/BitcodeReader.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/Bitcode/Reader/BitcodeReader.h') diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 55c71f7..053121b 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -156,6 +156,9 @@ class BitcodeReader : public GVMaterializer { // stored here with their replacement function. typedef std::vector > UpgradedIntrinsicMap; UpgradedIntrinsicMap UpgradedIntrinsics; + + // Map the bitcode's custom MDKind ID to the Module's MDKind ID. + DenseMap MDKindMap; // After the module header has been read, the FunctionsWithBodies list is // reversed. This keeps track of whether we've done this yet. @@ -170,11 +173,18 @@ class BitcodeReader : public GVMaterializer { /// are resolved lazily when functions are loaded. typedef std::pair BlockAddrRefTy; DenseMap > 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() { -- cgit v1.1