diff options
author | Teresa Johnson <tejohnson@google.com> | 2015-10-19 15:23:03 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2015-10-19 15:23:03 +0000 |
commit | 8af8d4ed9314f1972ffc9cead97df9bf837e52ba (patch) | |
tree | b8e5b38ced4d8d93604c009bc087391c5c9d84ee | |
parent | a80b50820b3fb794ef5b5c7b4836a81636fef093 (diff) | |
download | bcm5719-llvm-8af8d4ed9314f1972ffc9cead97df9bf837e52ba.tar.gz bcm5719-llvm-8af8d4ed9314f1972ffc9cead97df9bf837e52ba.zip |
Convert gold-plugin unnecessary unique_ptr into local (NFC)
llvm-svn: 250704
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 31cbd4e5686..bb718f708cc 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -896,7 +896,7 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) { // function index/summary and emit it. We don't need to parse the modules // and link them in this case. if (options::thinlto) { - std::unique_ptr<FunctionInfoIndex> CombinedIndex(new FunctionInfoIndex()); + FunctionInfoIndex CombinedIndex; uint64_t NextModuleId = 0; for (claimed_file &F : Modules) { ld_plugin_input_file File; @@ -905,7 +905,7 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) { std::unique_ptr<FunctionInfoIndex> Index = getFunctionIndexForFile(Context, F, File); - CombinedIndex->mergeFrom(std::move(Index), ++NextModuleId); + CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId); } std::error_code EC; @@ -914,7 +914,7 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) { if (EC) message(LDPL_FATAL, "Unable to open %s.thinlto.bc for writing: %s", output_name.data(), EC.message().c_str()); - WriteFunctionSummaryToFile(CombinedIndex.get(), OS); + WriteFunctionSummaryToFile(&CombinedIndex, OS); OS.close(); cleanup_hook(); |