// 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;
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;
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();