From 43aa8f03c18459b574d49d6a11616845e1d2ba30 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 20 Jul 2010 21:42:28 +0000 Subject: Add support for remapping metadata kind IDs when reading in a bitcode file, so that two bitcode files where the same metadata kind name happens to have been assigned a different ID can still be linked together. Eliminate the restriction that metadata kind IDs can't be 0. Change MD_dbg from 1 to 0, because we can now, and because it's less mysterious that way. llvm-svn: 108939 --- llvm/lib/Bitcode/Reader/BitcodeReader.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h index 55c71f7c886..a5ab5d29e91 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.h +++ b/llvm/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. -- cgit v1.2.3