summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Tooling.cpp
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-07 20:03:18 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-07 20:03:18 +0000
commitb89843299a118d9f97774f35e59f9b541ef5e284 (patch)
treeee6366d2f652d2475d52f6ea9b4fbbc64dc2647e /clang/lib/Tooling/Tooling.cpp
parent629afaefe0cd1a583ccee54918b7b13f48bfe273 (diff)
downloadbcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.tar.gz
bcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.zip
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
Diffstat (limited to 'clang/lib/Tooling/Tooling.cpp')
-rw-r--r--clang/lib/Tooling/Tooling.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp
index 9783ed0fe0e..c720bf4e851 100644
--- a/clang/lib/Tooling/Tooling.cpp
+++ b/clang/lib/Tooling/Tooling.cpp
@@ -207,18 +207,18 @@ bool ToolInvocation::run() {
IntrusiveRefCntPtr<clang::DiagnosticIDs>(new DiagnosticIDs()), &*DiagOpts,
DiagConsumer ? DiagConsumer : &DiagnosticPrinter, false);
- const OwningPtr<clang::driver::Driver> Driver(
+ const std::unique_ptr<clang::driver::Driver> Driver(
newDriver(&Diagnostics, BinaryName));
// Since the input might only be virtual, don't check whether it exists.
Driver->setCheckInputsExist(false);
- const OwningPtr<clang::driver::Compilation> Compilation(
+ const std::unique_ptr<clang::driver::Compilation> Compilation(
Driver->BuildCompilation(llvm::makeArrayRef(Argv)));
const llvm::opt::ArgStringList *const CC1Args = getCC1Arguments(
&Diagnostics, Compilation.get());
if (CC1Args == NULL) {
return false;
}
- OwningPtr<clang::CompilerInvocation> Invocation(
+ std::unique_ptr<clang::CompilerInvocation> Invocation(
newInvocation(&Diagnostics, *CC1Args));
for (llvm::StringMap<StringRef>::const_iterator
It = MappedFileContents.begin(), End = MappedFileContents.end();
@@ -255,8 +255,8 @@ bool FrontendActionFactory::runInvocation(CompilerInvocation *Invocation,
// The FrontendAction can have lifetime requirements for Compiler or its
// members, and we need to ensure it's deleted earlier than Compiler. So we
- // pass it to an OwningPtr declared after the Compiler variable.
- OwningPtr<FrontendAction> ScopedToolAction(create());
+ // pass it to an std::unique_ptr declared after the Compiler variable.
+ std::unique_ptr<FrontendAction> ScopedToolAction(create());
// Create the compilers actual diagnostics engine.
Compiler.createDiagnostics(DiagConsumer, /*ShouldOwnClient=*/false);
OpenPOWER on IntegriCloud