IR: Allow multiple global metadata attachments with the same type.
This will be necessary to allow the global merge pass to attach multiple debug info metadata nodes to global variables once we reverse the edge from DIGlobalVariable to GlobalVariable. Differential Revision: http://reviews.llvm.org/D20414 llvm-svn: 271358
This commit is contained in:
@@ -4167,7 +4167,7 @@ std::error_code BitcodeReader::parseGlobalObjectAttachment(
|
||||
MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[I + 1]);
|
||||
if (!MD)
|
||||
return error("Invalid metadata attachment");
|
||||
GO.setMetadata(K->second, MD);
|
||||
GO.addMetadata(K->second, *MD);
|
||||
}
|
||||
return std::error_code();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user