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) {...@@ -193,8 +193,8 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
193193
194 // Register the support for object-file-wrapped Clang modules.194 // Register the support for object-file-wrapped Clang modules.
195 auto PCHOps = Clang->getPCHContainerOperations();195 auto PCHOps = Clang->getPCHContainerOperations();
196 PCHOps->registerWriter(llvm::make_unique<ObjectFilePCHContainerWriter>());196 PCHOps->registerWriter(std::make_unique<ObjectFilePCHContainerWriter>());
197 PCHOps->registerReader(llvm::make_unique<ObjectFilePCHContainerReader>());197 PCHOps->registerReader(std::make_unique<ObjectFilePCHContainerReader>());
198198
199 // Initialize targets first, so that --version shows registered targets.199 // Initialize targets first, so that --version shows registered targets.
200 llvm::InitializeAllTargets();200 llvm::InitializeAllTargets();
src/zig_clang_cc1as_main.cpp+4-4
...@@ -312,7 +312,7 @@ getOutputStream(StringRef Path, DiagnosticsEngine &Diags, bool Binary) {...@@ -312,7 +312,7 @@ getOutputStream(StringRef Path, DiagnosticsEngine &Diags, bool Binary) {
312 sys::RemoveFileOnSignal(Path);312 sys::RemoveFileOnSignal(Path);
313313
314 std::error_code EC;314 std::error_code EC;
315 auto Out = llvm::make_unique<raw_fd_ostream>(315 auto Out = std::make_unique<raw_fd_ostream>(
316 Path, EC, (Binary ? sys::fs::F_None : sys::fs::F_Text));316 Path, EC, (Binary ? sys::fs::F_None : sys::fs::F_Text));
317 if (EC) {317 if (EC) {
318 Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();318 Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
...@@ -445,7 +445,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,...@@ -445,7 +445,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
445 std::unique_ptr<MCAsmBackend> MAB(445 std::unique_ptr<MCAsmBackend> MAB(
446 TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions));446 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);
449 Str.reset(TheTarget->createAsmStreamer(449 Str.reset(TheTarget->createAsmStreamer(
450 Ctx, std::move(FOut), /*asmverbose*/ true,450 Ctx, std::move(FOut), /*asmverbose*/ true,
451 /*useDwarfDirectory*/ true, IP, std::move(CE), std::move(MAB),451 /*useDwarfDirectory*/ true, IP, std::move(CE), std::move(MAB),
...@@ -456,7 +456,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,...@@ -456,7 +456,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
456 assert(Opts.OutputType == AssemblerInvocation::FT_Obj &&456 assert(Opts.OutputType == AssemblerInvocation::FT_Obj &&
457 "Invalid file type!");457 "Invalid file type!");
458 if (!FDOS->supportsSeeking()) {458 if (!FDOS->supportsSeeking()) {
459 BOS = make_unique<buffer_ostream>(*FDOS);459 BOS = std::make_unique<buffer_ostream>(*FDOS);
460 Out = BOS.get();460 Out = BOS.get();
461 }461 }
462462
...@@ -590,7 +590,7 @@ int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {...@@ -590,7 +590,7 @@ int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
590 // FIXME: Remove this, one day.590 // FIXME: Remove this, one day.
591 if (!Asm.LLVMArgs.empty()) {591 if (!Asm.LLVMArgs.empty()) {
592 unsigned NumArgs = Asm.LLVMArgs.size();592 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);
594 Args[0] = "clang (LLVM option parsing)";594 Args[0] = "clang (LLVM option parsing)";
595 for (unsigned i = 0; i != NumArgs; ++i)595 for (unsigned i = 0; i != NumArgs; ++i)
596 Args[i + 1] = Asm.LLVMArgs[i].c_str();596 Args[i + 1] = Asm.LLVMArgs[i].c_str();