From: Sanjoy Das Date: Mon, 26 Sep 2016 00:22:18 +0000 (+0000) Subject: Appease MSVC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbc0b21d22589df9af074403777072263d1cb262;p=llvm Appease MSVC ... by not default move constructors and operator= s. Defaulting these works in clang, but not in MSVC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282370 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index cd917b74037..4b5fb473dce 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -597,8 +597,19 @@ private: // Clang builds fine without this, but MSVC does not. ExitNotTakenInfo(const ExitNotTakenInfo &) = delete; - ExitNotTakenInfo(ExitNotTakenInfo &&) = default; - ExitNotTakenInfo &operator=(ExitNotTakenInfo &&) = default; + + ExitNotTakenInfo(ExitNotTakenInfo &&Other) { + ExitingBlock = std::move(Other.ExitingBlock); + ExactNotTaken = std::move(Other.ExactNotTaken); + Predicate = std::move(Other.Predicate); + } + + ExitNotTakenInfo &operator=(ExitNotTakenInfo &&Other) { + ExitingBlock = std::move(Other.ExitingBlock); + ExactNotTaken = std::move(Other.ExactNotTaken); + Predicate = std::move(Other.Predicate); + return *this; + } }; /// Information about the backedge-taken count of a loop. This currently @@ -628,8 +639,17 @@ private: BackedgeTakenInfo() : MaxAndComplete(nullptr, 0) {} BackedgeTakenInfo(const BackedgeTakenInfo &) = delete; - BackedgeTakenInfo(BackedgeTakenInfo &&) = default; - BackedgeTakenInfo &operator=(BackedgeTakenInfo &&) = default; + + BackedgeTakenInfo(BackedgeTakenInfo &&Other) { + ExitNotTaken = std::move(Other.ExitNotTaken); + MaxAndComplete = std::move(Other.MaxAndComplete); + } + + BackedgeTakenInfo &operator=(BackedgeTakenInfo &&Other) { + ExitNotTaken = std::move(Other.ExitNotTaken); + MaxAndComplete = std::move(Other.MaxAndComplete); + return *this; + } /// Initialize BackedgeTakenInfo from a list of exact exit counts. BackedgeTakenInfo(ArrayRef ExitCounts, bool Complete,