summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/Rewrite/FrontendActions.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
commit62a56f39b7c5587a1b2144880500689bea5f32e4 (patch)
treec6f21dd30c4dfd02f50e4ca54712b24f2022a6f4 /clang/lib/Frontend/Rewrite/FrontendActions.cpp
parent5bae2c87d5946ee72ad31d88033ed5ecbd01ada2 (diff)
downloadbcm5719-llvm-62a56f39b7c5587a1b2144880500689bea5f32e4.tar.gz
bcm5719-llvm-62a56f39b7c5587a1b2144880500689bea5f32e4.zip
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. llvm-svn: 213325
Diffstat (limited to 'clang/lib/Frontend/Rewrite/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/Rewrite/FrontendActions.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Frontend/Rewrite/FrontendActions.cpp b/clang/lib/Frontend/Rewrite/FrontendActions.cpp
index 1b5eb2855be..59fef736f16 100644
--- a/clang/lib/Frontend/Rewrite/FrontendActions.cpp
+++ b/clang/lib/Frontend/Rewrite/FrontendActions.cpp
@@ -30,8 +30,8 @@ using namespace clang;
// AST Consumer Actions
//===----------------------------------------------------------------------===//
-std::unique_ptr<ASTConsumer>
-HTMLPrintAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
+ASTConsumer *HTMLPrintAction::CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) {
if (raw_ostream *OS = CI.createDefaultOutputFile(false, InFile))
return CreateHTMLPrinter(OS, CI.getPreprocessor());
return nullptr;
@@ -40,9 +40,9 @@ HTMLPrintAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
FixItAction::FixItAction() {}
FixItAction::~FixItAction() {}
-std::unique_ptr<ASTConsumer>
-FixItAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ASTConsumer *FixItAction::CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) {
+ return new ASTConsumer();
}
namespace {
@@ -148,8 +148,8 @@ bool FixItRecompile::BeginInvocation(CompilerInstance &CI) {
#ifdef CLANG_ENABLE_OBJC_REWRITER
-std::unique_ptr<ASTConsumer>
-RewriteObjCAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
+ASTConsumer *RewriteObjCAction::CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) {
if (raw_ostream *OS = CI.createDefaultOutputFile(false, InFile, "cpp")) {
if (CI.getLangOpts().ObjCRuntime.isNonFragile())
return CreateModernObjCRewriter(InFile, OS,
OpenPOWER on IntegriCloud