authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 16:18:44+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 16:18:44+02:00
logfd4c8a40e94d4717df59700371c6e60651cf5e0d
tree38c64300ef20147b34b760024ebbcdecba149fe3
parent6439759298c13c884e92a59fbcba6fe20d81ced5

Replace llvm::make_unique with std::make_unique


2 files changed, 6 insertions(+), 6 deletions(-)

src/zig_clang_cc1_main.cpp+2-2
......@@ -193,8 +193,8 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
193193
194194 // Register the support for object-file-wrapped Clang modules.
195195 auto PCHOps = Clang->getPCHContainerOperations();
196 PCHOps->registerWriter(llvm::make_unique<ObjectFilePCHContainerWriter>());
197 PCHOps->registerReader(llvm::make_unique<ObjectFilePCHContainerReader>());
196 PCHOps->registerWriter(std::make_unique<ObjectFilePCHContainerWriter>());
197 PCHOps->registerReader(std::make_unique<ObjectFilePCHContainerReader>());
198198
199199 // Initialize targets first, so that --version shows registered targets.
200200 llvm::InitializeAllTargets();
src/zig_clang_cc1as_main.cpp+4-4
......@@ -312,7 +312,7 @@ getOutputStream(StringRef Path, DiagnosticsEngine &Diags, bool Binary) {
312312 sys::RemoveFileOnSignal(Path);
313313
314314 std::error_code EC;
315 auto Out = llvm::make_unique<raw_fd_ostream>(
315 auto Out = std::make_unique<raw_fd_ostream>(
316316 Path, EC, (Binary ? sys::fs::F_None : sys::fs::F_Text));
317317 if (EC) {
318318 Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
......@@ -445,7 +445,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
445445 std::unique_ptr<MCAsmBackend> MAB(
446446 TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions));
447447
448 auto FOut = llvm::make_unique<formatted_raw_ostream>(*Out);
448 auto FOut = std::make_unique<formatted_raw_ostream>(*Out);
449449 Str.reset(TheTarget->createAsmStreamer(
450450 Ctx, std::move(FOut), /*asmverbose*/ true,
451451 /*useDwarfDirectory*/ true, IP, std::move(CE), std::move(MAB),
......@@ -456,7 +456,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
456456 assert(Opts.OutputType == AssemblerInvocation::FT_Obj &&
457457 "Invalid file type!");
458458 if (!FDOS->supportsSeeking()) {
459 BOS = make_unique<buffer_ostream>(*FDOS);
459 BOS = std::make_unique<buffer_ostream>(*FDOS);
460460 Out = BOS.get();
461461 }
462462
......@@ -590,7 +590,7 @@ int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
590590 // FIXME: Remove this, one day.
591591 if (!Asm.LLVMArgs.empty()) {
592592 unsigned NumArgs = Asm.LLVMArgs.size();
593 auto Args = llvm::make_unique<const char*[]>(NumArgs + 2);
593 auto Args = std::make_unique<const char*[]>(NumArgs + 2);
594594 Args[0] = "clang (LLVM option parsing)";
595595 for (unsigned i = 0; i != NumArgs; ++i)
596596 Args[i + 1] = Asm.LLVMArgs[i].c_str();