summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:04:18 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:04:18 +0000
commit2b3d49b610bd2a45884115edcb21110bfa325f51 (patch)
tree4c64632086b8cf0a8d7ee68306f564532a5ea78f /clang/lib/Frontend/FrontendActions.cpp
parent5cd312d352dc663aec3b658e2bf5da347f365eb1 (diff)
downloadbcm5719-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/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 14db8788c7e..08826c2fea5 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -55,7 +55,7 @@ void EnsureSemaIsCreated(CompilerInstance &CI, FrontendAction &Action) {
std::unique_ptr<ASTConsumer>
InitOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void InitOnlyAction::ExecuteAction() {
@@ -109,7 +109,7 @@ GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
const auto &FrontendOpts = CI.getFrontendOpts();
auto Buffer = std::make_shared<PCHBuffer>();
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
- Consumers.push_back(llvm::make_unique<PCHGenerator>(
+ Consumers.push_back(std::make_unique<PCHGenerator>(
CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer,
FrontendOpts.ModuleFileExtensions,
CI.getPreprocessorOpts().AllowPCHWithCompilerErrors,
@@ -117,7 +117,7 @@ GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, InFile, OutputFile, std::move(OS), Buffer));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,
@@ -172,7 +172,7 @@ GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI,
auto Buffer = std::make_shared<PCHBuffer>();
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
- Consumers.push_back(llvm::make_unique<PCHGenerator>(
+ Consumers.push_back(std::make_unique<PCHGenerator>(
CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer,
CI.getFrontendOpts().ModuleFileExtensions,
/*AllowASTWithErrors=*/false,
@@ -182,7 +182,7 @@ GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI,
+CI.getFrontendOpts().BuildingImplicitModule));
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, InFile, OutputFile, std::move(OS), Buffer));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool GenerateModuleFromModuleMapAction::BeginSourceFileAction(
@@ -313,18 +313,18 @@ SyntaxOnlyAction::~SyntaxOnlyAction() {
std::unique_ptr<ASTConsumer>
SyntaxOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
std::unique_ptr<ASTConsumer>
DumpModuleInfoAction::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
std::unique_ptr<ASTConsumer>
VerifyPCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void VerifyPCHAction::ExecuteAction() {
@@ -466,7 +466,7 @@ private:
std::unique_ptr<ASTConsumer>
TemplightDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void TemplightDumpAction::ExecuteAction() {
@@ -479,7 +479,7 @@ void TemplightDumpAction::ExecuteAction() {
EnsureSemaIsCreated(CI, *this);
CI.getSema().TemplateInstCallbacks.push_back(
- llvm::make_unique<DefaultTemplateInstCallback>());
+ std::make_unique<DefaultTemplateInstCallback>());
ASTFrontendAction::ExecuteAction();
}
OpenPOWER on IntegriCloud