diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-20 21:42:28 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-20 21:42:28 +0000 |
commit | 19538d1e9fb4f8198b94f8450c6fc43528d8b868 (patch) | |
tree | 80e4eb366ba74a1e80c1f102b65ed2e869d7542d /lib/Bitcode/Reader/BitcodeReader.h | |
parent | a7f9563c018d33eee1586da8aa26a1faa58a3cea (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 55c71f7c88..a5ab5d29e9 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<std::pair<Function*, Function*> > UpgradedIntrinsicMap; UpgradedIntrinsicMap UpgradedIntrinsics; + + // Map the bitcode's custom MDKind ID to the Module's MDKind ID. + DenseMap<unsigned, unsigned> MDKindMap; // After the module header has been read, the FunctionsWithBodies list is // reversed. This keeps track of whether we've done this yet. |