diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index ecd05c245d7d..dc8a904921d4 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1215,9 +1215,9 @@ Metadata *BitcodeReaderMetadataList::upgradeTypeRefArray(Metadata *MaybeTuple) { // Create and return a placeholder to use for now. Eventually // resolveTypeRefArrays() will be resolve this forward reference. - OldTypeRefs.Arrays.emplace_back( - std::piecewise_construct, std::make_tuple(Tuple), - std::make_tuple(MDTuple::getTemporary(Context, None))); + OldTypeRefs.Arrays.emplace_back(); + OldTypeRefs.Arrays.back().first.reset(Tuple); + OldTypeRefs.Arrays.back().second = MDTuple::getTemporary(Context, None); return OldTypeRefs.Arrays.back().second.get(); }