Change OwningPtr::take() to OwningPtr::release().
This is a precursor to moving to std::unique_ptr.
llvm-svn: 203275
diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp
index dad4600..232c329 100644
--- a/clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -126,7 +126,7 @@
JSONCompilationDatabase::loadFromFile(JSONDatabasePath, ErrorMessage));
if (!Database)
return NULL;
- return Database.take();
+ return Database.release();
}
};
@@ -152,10 +152,10 @@
return NULL;
}
OwningPtr<JSONCompilationDatabase> Database(
- new JSONCompilationDatabase(DatabaseBuffer.take()));
+ new JSONCompilationDatabase(DatabaseBuffer.release()));
if (!Database->parse(ErrorMessage))
return NULL;
- return Database.take();
+ return Database.release();
}
JSONCompilationDatabase *
@@ -164,10 +164,10 @@
OwningPtr<llvm::MemoryBuffer> DatabaseBuffer(
llvm::MemoryBuffer::getMemBuffer(DatabaseString));
OwningPtr<JSONCompilationDatabase> Database(
- new JSONCompilationDatabase(DatabaseBuffer.take()));
+ new JSONCompilationDatabase(DatabaseBuffer.release()));
if (!Database->parse(ErrorMessage))
return NULL;
- return Database.take();
+ return Database.release();
}
std::vector<CompileCommand>
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp
index ee110e3..9783ed0 100644
--- a/clang/lib/Tooling/Tooling.cpp
+++ b/clang/lib/Tooling/Tooling.cpp
@@ -228,7 +228,7 @@
llvm::MemoryBuffer::getMemBuffer(It->getValue());
Invocation->getPreprocessorOpts().addRemappedFile(It->getKey(), Input);
}
- return runInvocation(BinaryName, Compilation.get(), Invocation.take());
+ return runInvocation(BinaryName, Compilation.get(), Invocation.release());
}
bool ToolInvocation::runInvocation(