summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/src/backend/program.cpp8
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;