}
std::unique_ptr<Module> Combined(new Module("ld-temp.o", Context));
- Linker L(Combined.get());
+ Linker L(*Combined);
std::string DefaultTriple = sys::getDefaultTargetTriple();
M->setTargetTriple(DefaultTriple);
}
- if (L.linkInModule(M.get()))
+ if (L.linkInModule(*M))
message(LDPL_FATAL, "Failed to link module");
if (release_input_file(F.handle) != LDPS_OK)
message(LDPL_FATAL, "Failed to release file information");
path = output_name;
else
path = output_name + ".bc";
- saveBCFile(path, *L.getModule());
+ saveBCFile(path, *Combined);
if (options::TheOutputType == options::OT_BC_ONLY)
return LDPS_OK;
}