summaryrefslogtreecommitdiff
path: root/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r--lib/Frontend/CreateInvocationFromCommandLine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp
index 16269064b6..1e9e57afb6 100644
--- a/lib/Frontend/CreateInvocationFromCommandLine.cpp
+++ b/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.
-std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine(
- ArrayRef<const char *> ArgList,
- IntrusiveRefCntPtr<DiagnosticsEngine> Diags) {
+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 @@ std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine(
}
const ArgStringList &CCArgs = Cmd.getArguments();
- auto CI = llvm::make_unique<CompilerInvocation>();
+ std::unique_ptr<CompilerInvocation> CI(new CompilerInvocation());
if (!CompilerInvocation::CreateFromArgs(*CI,
const_cast<const char **>(CCArgs.data()),
const_cast<const char **>(CCArgs.data()) +
CCArgs.size(),
*Diags))
return nullptr;
- return CI;
+ return CI.release();
}