diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-01 01:17:57 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-01 01:17:57 +0000 |
commit | 382d81cacf066452b98128b680f0988e5bda89a8 (patch) | |
tree | 1d50935b001bb7b52b70a6a9d87e0b3139b82292 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 09ec5756dc7d92c3a2f91313736c157bf3ffd848 (diff) | |
download | llvm-382d81cacf066452b98128b680f0988e5bda89a8.zip llvm-382d81cacf066452b98128b680f0988e5bda89a8.tar.gz llvm-382d81cacf066452b98128b680f0988e5bda89a8.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 55c0d06..287be9b 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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(); } |