aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:24:06 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:24:06 +0000
commit95ec533a1d8c450f6c6c5e84fe85423960e13382 (patch)
treebfe77b0dccd50ed2f4b4e6299d4bc4eaafced6e7 /contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parent2b532af82919b9141e7fd04becf354a0a7dfa813 (diff)
parent7e7b6700743285c0af506ac6299ddf82ebd434b9 (diff)
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
index 1e9e57afb6bd..16269064b6e1 100644
--- a/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
+++ b/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
@@ -30,9 +30,9 @@ using namespace llvm::opt;
///
/// \return A CompilerInvocation, or 0 if none was built for the given
/// argument vector.
-CompilerInvocation *
-clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
- IntrusiveRefCntPtr<DiagnosticsEngine> Diags) {
+std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine(
+ ArrayRef<const char *> ArgList,
+ IntrusiveRefCntPtr<DiagnosticsEngine> Diags) {
if (!Diags.get()) {
// No diagnostics engine was provided, so create our own diagnostics object
// with the default options.
@@ -93,12 +93,12 @@ clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
}
const ArgStringList &CCArgs = Cmd.getArguments();
- std::unique_ptr<CompilerInvocation> CI(new CompilerInvocation());
+ auto CI = llvm::make_unique<CompilerInvocation>();
if (!CompilerInvocation::CreateFromArgs(*CI,
const_cast<const char **>(CCArgs.data()),
const_cast<const char **>(CCArgs.data()) +
CCArgs.size(),
*Diags))
return nullptr;
- return CI.release();
+ return CI;
}