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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user