<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 23, 2016 at 2:23 PM, Duncan P. N. Exon Smith via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dexonsmith<br>
Date: Sat Apr 23 16:23:41 2016<br>
New Revision: 267298<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267298&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=267298&view=rev</a><br>
Log:<br>
BitcodeReader: Avoid non-moving std::piecewise_construct from r267296<br>
<br>
Not exactly sure why the host tries to use a copy constructor here, but<br>
it's easy enough to work around it.<br>
<br>
<a href="http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/6227" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/6227</a><br>
<br>
Modified:<br>
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp<br>
<br>
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=267298&r1=267297&r2=267298&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=267298&r1=267297&r2=267298&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)<br>
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Sat Apr 23 16:23:41 2016<br>
@@ -1215,9 +1215,9 @@ Metadata *BitcodeReaderMetadataList::upg<br>
<br>
// Create and return a placeholder to use for now. Eventually<br>
// resolveTypeRefArrays() will be resolve this forward reference.<br>
- OldTypeRefs.Arrays.emplace_back(<br>
- std::piecewise_construct, std::make_tuple(Tuple),<br>
- std::make_tuple(MDTuple::getTemporary(Context, None)));<br></blockquote><div><br></div><div>make_tuple copies the contents, like make_pair<br><br>Typically what you want to use with piecewise_construct is std::forward_as_tuple instead. This creates a tuple of references (of the right kind - rvalue or lvalue, etc). Try that?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ OldTypeRefs.Arrays.emplace_back();<br>
+ OldTypeRefs.Arrays.back().first.reset(Tuple);<br>
+ OldTypeRefs.Arrays.back().second = MDTuple::getTemporary(Context, None);<br>
return OldTypeRefs.Arrays.back().second.get();<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>