summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-09-02 10:49:58 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-09-02 10:49:58 +0000
commit0f0ef132aff2ac6d4e095da3b1f3b83c106dd8c1 (patch)
treebd090c635e7b2d41f59a356dd453e771415836b3
parente6ece918e9b9877abc690de90328349b612d40d3 (diff)
downloadbcm5719-llvm-0f0ef132aff2ac6d4e095da3b1f3b83c106dd8c1.tar.gz
bcm5719-llvm-0f0ef132aff2ac6d4e095da3b1f3b83c106dd8c1.zip
[PM] Try to fix an MSVC2013 failure due to finding a template
constructor when trying to do copy construction by adding an explicit move constructor. Will watch the bots to discover if this is sufficient. llvm-svn: 280479
-rw-r--r--llvm/unittests/Analysis/CGSCCPassManagerTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp b/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
index 4988e5f879a..3096bd2b6b1 100644
--- a/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
+++ b/llvm/unittests/Analysis/CGSCCPassManagerTest.cpp
@@ -128,6 +128,13 @@ char TestImmutableFunctionAnalysis::PassID;
struct LambdaSCCPass : public PassInfoMixin<LambdaSCCPass> {
template <typename T> LambdaSCCPass(T &&Arg) : Func(std::forward<T>(Arg)) {}
+ // We have to explicitly define all the special member functions because MSVC
+ // refuses to generate them.
+ LambdaSCCPass(LambdaSCCPass &&Arg) : Func(std::move(Arg.Func)) {}
+ LambdaSCCPass &operator=(LambdaSCCPass &&RHS) {
+ Func = std::move(RHS.Func);
+ return *this;
+ }
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
LazyCallGraph &CG, CGSCCUpdateResult &UR) {
@@ -141,6 +148,13 @@ struct LambdaSCCPass : public PassInfoMixin<LambdaSCCPass> {
struct LambdaFunctionPass : public PassInfoMixin<LambdaFunctionPass> {
template <typename T> LambdaFunctionPass(T &&Arg) : Func(std::forward<T>(Arg)) {}
+ // We have to explicitly define all the special member functions because MSVC
+ // refuses to generate them.
+ LambdaFunctionPass(LambdaFunctionPass &&Arg) : Func(std::move(Arg.Func)) {}
+ LambdaFunctionPass &operator=(LambdaFunctionPass &&RHS) {
+ Func = std::move(RHS.Func);
+ return *this;
+ }
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) {
return Func(F, AM);
OpenPOWER on IntegriCloud