summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/ChainedIncludesSource.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-07-17 22:34:12 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-07-17 22:34:12 +0000
commit80bfbba822da41b74969be8e635b1b4c8e2d3a8c (patch)
tree9c04bec373a4ad6b3b51026b7879cf93a535158d /lib/Frontend/ChainedIncludesSource.cpp
parent9a8dc2497021b3758e1c521c75f0c716da3ca0d4 (diff)
Revert "unique_ptr-ify ownership of ASTConsumers"
This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ChainedIncludesSource.cpp')
-rw-r--r--lib/Frontend/ChainedIncludesSource.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/ChainedIncludesSource.cpp b/lib/Frontend/ChainedIncludesSource.cpp
index 6b14e2505f..e6e73ac963 100644
--- a/lib/Frontend/ChainedIncludesSource.cpp
+++ b/lib/Frontend/ChainedIncludesSource.cpp
@@ -158,12 +158,12 @@ IntrusiveRefCntPtr<ExternalSemaSource> clang::createChainedIncludesSource(
SmallVector<char, 256> serialAST;
llvm::raw_svector_ostream OS(serialAST);
- auto consumer =
- llvm::make_unique<PCHGenerator>(Clang->getPreprocessor(), "-", nullptr,
- /*isysroot=*/"", &OS);
+ std::unique_ptr<ASTConsumer> consumer;
+ consumer.reset(new PCHGenerator(Clang->getPreprocessor(), "-", nullptr,
+ /*isysroot=*/"", &OS));
Clang->getASTContext().setASTMutationListener(
consumer->GetASTMutationListener());
- Clang->setASTConsumer(std::move(consumer));
+ Clang->setASTConsumer(consumer.release());
Clang->createSema(TU_Prefix, nullptr);
if (firstInclude) {