From 2b3d49b610bd2a45884115edcb21110bfa325f51 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 14 Aug 2019 23:04:18 +0000 Subject: [Clang] Migrate llvm::make_unique to std::make_unique Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942 --- clang/tools/driver/cc1as_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/tools/driver/cc1as_main.cpp') diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp index f3d815dc977..4a59b2056af 100644 --- a/clang/tools/driver/cc1as_main.cpp +++ b/clang/tools/driver/cc1as_main.cpp @@ -315,7 +315,7 @@ getOutputStream(StringRef Path, DiagnosticsEngine &Diags, bool Binary) { sys::RemoveFileOnSignal(Path); std::error_code EC; - auto Out = llvm::make_unique( + auto Out = std::make_unique( Path, EC, (Binary ? sys::fs::OF_None : sys::fs::OF_Text)); if (EC) { Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message(); @@ -450,7 +450,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, std::unique_ptr MAB( TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions)); - auto FOut = llvm::make_unique(*Out); + auto FOut = std::make_unique(*Out); Str.reset(TheTarget->createAsmStreamer( Ctx, std::move(FOut), /*asmverbose*/ true, /*useDwarfDirectory*/ true, IP, std::move(CE), std::move(MAB), @@ -461,7 +461,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, assert(Opts.OutputType == AssemblerInvocation::FT_Obj && "Invalid file type!"); if (!FDOS->supportsSeeking()) { - BOS = make_unique(*FDOS); + BOS = std::make_unique(*FDOS); Out = BOS.get(); } @@ -595,7 +595,7 @@ int cc1as_main(ArrayRef Argv, const char *Argv0, void *MainAddr) { // FIXME: Remove this, one day. if (!Asm.LLVMArgs.empty()) { unsigned NumArgs = Asm.LLVMArgs.size(); - auto Args = llvm::make_unique(NumArgs + 2); + auto Args = std::make_unique(NumArgs + 2); Args[0] = "clang (LLVM option parsing)"; for (unsigned i = 0; i != NumArgs; ++i) Args[i + 1] = Asm.LLVMArgs[i].c_str(); -- cgit v1.2.3