[llvm] r280479 - [PM] Try to fix an MSVC2013 failure due to finding a template
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 2 03:49:58 PDT 2016
Author: chandlerc
Date: Fri Sep 2 05:49:58 2016
New Revision: 280479
URL: http://llvm.org/viewvc/llvm-project?rev=280479&view=rev
Log:
[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.
Modified:
llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
Modified: llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp?rev=280479&r1=280478&r2=280479&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp Fri Sep 2 05:49:58 2016
@@ -128,6 +128,13 @@ char TestImmutableFunctionAnalysis::Pass
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 PassInfoMi
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);
More information about the llvm-commits
mailing list