<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 8:23 AM, Teresa Johnson 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: tejohnson<br>
Date: Mon Oct 19 10:23:03 2015<br>
New Revision: 250704<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=250704&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=250704&view=rev</a><br>
Log:<br>
Convert gold-plugin unnecessary unique_ptr into local (NFC)<br>
<br>
Modified:<br>
    llvm/trunk/tools/gold/gold-plugin.cpp<br>
<br>
Modified: llvm/trunk/tools/gold/gold-plugin.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=250704&r1=250703&r2=250704&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=250704&r1=250703&r2=250704&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)<br>
+++ llvm/trunk/tools/gold/gold-plugin.cpp Mon Oct 19 10:23:03 2015<br>
@@ -896,7 +896,7 @@ static ld_plugin_status allSymbolsReadHo<br>
   // function index/summary and emit it. We don't need to parse the modules<br>
   // and link them in this case.<br>
   if (options::thinlto) {<br>
-    std::unique_ptr<FunctionInfoIndex> CombinedIndex(new FunctionInfoIndex());<br>
+    FunctionInfoIndex CombinedIndex;<br>
     uint64_t NextModuleId = 0;<br>
     for (claimed_file &F : Modules) {<br>
       ld_plugin_input_file File;<br>
@@ -905,7 +905,7 @@ static ld_plugin_status allSymbolsReadHo<br>
<br>
       std::unique_ptr<FunctionInfoIndex> Index =<br>
           getFunctionIndexForFile(Context, F, File);<br>
-      CombinedIndex->mergeFrom(std::move(Index), ++NextModuleId);<br>
+      CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId);<br>
     }<br>
<br>
     std::error_code EC;<br>
@@ -914,7 +914,7 @@ static ld_plugin_status allSymbolsReadHo<br>
     if (EC)<br>
       message(LDPL_FATAL, "Unable to open %s.thinlto.bc for writing: %s",<br>
               output_name.data(), EC.message().c_str());<br>
-    WriteFunctionSummaryToFile(CombinedIndex.get(), OS);<br>
+    WriteFunctionSummaryToFile(&CombinedIndex, OS);<br></blockquote><div><br></div><div>^ should this function take a parameter by ref, rather than by pointer? (if it can't be null)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     OS.close();<br>
<br>
     cleanup_hook();<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>