summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-09 11:49:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-09 11:49:53 +0000
commitc3f3da3d214d8fe32f64bfb22060f20b026ca5e9 (patch)
tree374f63459b00967c6ac07917cdd6b87e2321e0e9 /llvm/tools
parenta3374446d46ccc9d15701a88a5d42a3303258e38 (diff)
downloadbcm5719-llvm-c3f3da3d214d8fe32f64bfb22060f20b026ca5e9.tar.gz
bcm5719-llvm-c3f3da3d214d8fe32f64bfb22060f20b026ca5e9.zip
[PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that
it is available. Also make the move semantics sufficiently correct to tolerate move-only passes, as the PassManagers *are* move-only passes. llvm-svn: 203391
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/opt/Passes.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/opt/Passes.cpp b/llvm/tools/opt/Passes.cpp
index ca143042f60..ffdf9bfec1f 100644
--- a/llvm/tools/opt/Passes.cpp
+++ b/llvm/tools/opt/Passes.cpp
@@ -101,7 +101,7 @@ static bool parseFunctionPassPipeline(FunctionPassManager &FPM,
PipelineText = PipelineText.substr(1);
// Add the nested pass manager with the appropriate adaptor.
- FPM.addPass(NestedFPM);
+ FPM.addPass(std::move(NestedFPM));
} else {
// Otherwise try to parse a pass name.
size_t End = PipelineText.find_first_of(",)");
@@ -138,7 +138,7 @@ static bool parseModulePassPipeline(ModulePassManager &MPM,
PipelineText = PipelineText.substr(1);
// Now add the nested manager as a module pass.
- MPM.addPass(NestedMPM);
+ MPM.addPass(std::move(NestedMPM));
} else if (PipelineText.startswith("function(")) {
FunctionPassManager NestedFPM;
@@ -151,7 +151,7 @@ static bool parseModulePassPipeline(ModulePassManager &MPM,
PipelineText = PipelineText.substr(1);
// Add the nested pass manager with the appropriate adaptor.
- MPM.addPass(createModuleToFunctionPassAdaptor(NestedFPM));
+ MPM.addPass(createModuleToFunctionPassAdaptor(std::move(NestedFPM)));
} else {
// Otherwise try to parse a pass name.
size_t End = PipelineText.find_first_of(",)");
@@ -185,7 +185,7 @@ bool llvm::parsePassPipeline(ModulePassManager &MPM, StringRef PipelineText,
if (!parseFunctionPassPipeline(FPM, PipelineText, VerifyEachPass) ||
!PipelineText.empty())
return false;
- MPM.addPass(createModuleToFunctionPassAdaptor(FPM));
+ MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
return true;
}
@@ -201,7 +201,7 @@ bool llvm::parsePassPipeline(ModulePassManager &MPM, StringRef PipelineText,
if (!parseFunctionPassPipeline(FPM, PipelineText, VerifyEachPass) ||
!PipelineText.empty())
return false;
- MPM.addPass(createModuleToFunctionPassAdaptor(FPM));
+ MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
return true;
}
OpenPOWER on IntegriCloud