From d760c2cf9d1877dcc29b556362d46d7891fac565 Mon Sep 17 00:00:00 2001 From: Ruiling Song Date: Mon, 23 Jun 2014 14:39:26 +0800 Subject: [PATCH] GBE: replace OwningPtr with std::unique_ptr Signed-off-by: Ruiling Song Reviewed-by: Zhigang Gong --- backend/src/backend/program.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index 934aeb2..81b6dd5 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -68,7 +68,6 @@ #include #include #include -#include #if LLVM_VERSION_MINOR <= 2 #include #else @@ -609,7 +608,7 @@ namespace gbe { clang::DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient); #endif /* LLVM_VERSION_MINOR <= 1 */ // Create the compiler invocation - llvm::OwningPtr CI(new clang::CompilerInvocation); + std::unique_ptr CI(new clang::CompilerInvocation); clang::CompilerInvocation::CreateFromArgs(*CI, &args[0], &args[0] + args.size(), @@ -617,7 +616,7 @@ namespace gbe { // Create the compiler instance clang::CompilerInstance Clang; - Clang.setInvocation(CI.take()); + Clang.setInvocation(CI.release()); // Get ready to report problems #if LLVM_VERSION_MINOR <= 2 Clang.createDiagnostics(args.size(), &args[0]); @@ -650,7 +649,7 @@ namespace gbe { } // Create an action and make the compiler instance carry it out - llvm::OwningPtr Act(new clang::EmitLLVMOnlyAction(llvm_ctx)); + std::unique_ptr Act(new clang::EmitLLVMOnlyAction(llvm_ctx)); std::string dirs = OCL_PCM_PATH; std::string pcmFileName; -- 2.7.4