diff options
author | Zhigang Gong <zhigang.gong@gmail.com> | 2014-06-20 09:44:22 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@gmail.com> | 2014-06-20 09:44:22 +0800 |
commit | 5616c0f0421995de8ef9c63932cf97c0f1879077 (patch) | |
tree | 52433ae09aff94d5e35ad3f0bc6bf7d6a8fa5046 | |
parent | 0c98415a79d4129629bb383a1b8658bcfa641598 (diff) |
draftllvm-3.5
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
-rw-r--r-- | backend/src/backend/program.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index 934aeb2c..13ee5ad6 100644 --- a/backend/src/backend/program.cpp +++ b/backend/src/backend/program.cpp @@ -68,7 +68,6 @@ #include <clang/Basic/TargetInfo.h> #include <clang/Basic/TargetOptions.h> #include <llvm/ADT/IntrusiveRefCntPtr.h> -#include <llvm/ADT/OwningPtr.h> #if LLVM_VERSION_MINOR <= 2 #include <llvm/Module.h> #else @@ -609,7 +608,7 @@ namespace gbe { clang::DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient); #endif /* LLVM_VERSION_MINOR <= 1 */ // Create the compiler invocation - llvm::OwningPtr<clang::CompilerInvocation> CI(new clang::CompilerInvocation); + std::unique_ptr<clang::CompilerInvocation> CI(new clang::CompilerInvocation); clang::CompilerInvocation::CreateFromArgs(*CI, &args[0], &args[0] + args.size(), @@ -617,7 +616,8 @@ namespace gbe { // Create the compiler instance clang::CompilerInstance Clang; - Clang.setInvocation(CI.take()); + Clang.setInvocation((std::move(CI)).get()); + CI.release(); // Get ready to report problems #if LLVM_VERSION_MINOR <= 2 Clang.createDiagnostics(args.size(), &args[0]); @@ -650,7 +650,7 @@ namespace gbe { } // Create an action and make the compiler instance carry it out - llvm::OwningPtr<clang::CodeGenAction> Act(new clang::EmitLLVMOnlyAction(llvm_ctx)); + std::unique_ptr<clang::CodeGenAction> Act(new clang::EmitLLVMOnlyAction(llvm_ctx)); std::string dirs = OCL_PCM_PATH; std::string pcmFileName; |