diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-14 23:04:18 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-14 23:04:18 +0000 |
commit | 2b3d49b610bd2a45884115edcb21110bfa325f51 (patch) | |
tree | 4c64632086b8cf0a8d7ee68306f564532a5ea78f /clang/lib/Frontend/ASTUnit.cpp | |
parent | 5cd312d352dc663aec3b658e2bf5da347f365eb1 (diff) | |
download | bcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.tar.gz bcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.zip |
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368942
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 7e3f7a2f13f..ac6e6b6048e 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -819,7 +819,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile( /*isysroot=*/"", /*DisableValidation=*/disableValid, AllowPCHWithCompilerErrors); - AST->Reader->setListener(llvm::make_unique<ASTInfoCollector>( + AST->Reader->setListener(std::make_unique<ASTInfoCollector>( *AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts, AST->TargetOpts, AST->Target, Counter)); @@ -999,9 +999,9 @@ public: std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { CI.getPreprocessor().addPPCallbacks( - llvm::make_unique<MacroDefinitionTrackerPPCallbacks>( + std::make_unique<MacroDefinitionTrackerPPCallbacks>( Unit.getCurrentTopLevelHashValue())); - return llvm::make_unique<TopLevelDeclTrackerConsumer>( + return std::make_unique<TopLevelDeclTrackerConsumer>( Unit, Unit.getCurrentTopLevelHashValue()); } @@ -1049,7 +1049,7 @@ public: } std::unique_ptr<PPCallbacks> createPPCallbacks() override { - return llvm::make_unique<MacroDefinitionTrackerPPCallbacks>(Hash); + return std::make_unique<MacroDefinitionTrackerPPCallbacks>(Hash); } private: @@ -1624,15 +1624,15 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction( if (Persistent && !TrackerAct) { Clang->getPreprocessor().addPPCallbacks( - llvm::make_unique<MacroDefinitionTrackerPPCallbacks>( + std::make_unique<MacroDefinitionTrackerPPCallbacks>( AST->getCurrentTopLevelHashValue())); std::vector<std::unique_ptr<ASTConsumer>> Consumers; if (Clang->hasASTConsumer()) Consumers.push_back(Clang->takeASTConsumer()); - Consumers.push_back(llvm::make_unique<TopLevelDeclTrackerConsumer>( + Consumers.push_back(std::make_unique<TopLevelDeclTrackerConsumer>( *AST, AST->getCurrentTopLevelHashValue())); Clang->setASTConsumer( - llvm::make_unique<MultiplexConsumer>(std::move(Consumers))); + std::make_unique<MultiplexConsumer>(std::move(Consumers))); } if (llvm::Error Err = Act->Execute()) { consumeError(std::move(Err)); // FIXME this drops errors on the floor. |