]> granicus.if.org Git - llvm/commitdiff
Attempt to appease MSVC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 26 Sep 2016 00:00:51 +0000 (00:00 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 26 Sep 2016 00:00:51 +0000 (00:00 +0000)
... by explicitly deleting the copy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282369 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ScalarEvolution.h

index 830334db6915b460d585191f46fac3d3b667f319..cd917b740375861a412348cd2e5589c903db4e72 100644 (file)
@@ -594,6 +594,11 @@ private:
                               std::unique_ptr<SCEVUnionPredicate> Predicate)
         : ExitingBlock(ExitingBlock), ExactNotTaken(ExactNotTaken),
           Predicate(std::move(Predicate)) {}
+
+    // Clang builds fine without this, but MSVC does not.
+    ExitNotTakenInfo(const ExitNotTakenInfo &) = delete;
+    ExitNotTakenInfo(ExitNotTakenInfo &&) = default;
+    ExitNotTakenInfo &operator=(ExitNotTakenInfo &&) = default;
   };
 
   /// Information about the backedge-taken count of a loop. This currently
@@ -622,6 +627,10 @@ private:
   public:
     BackedgeTakenInfo() : MaxAndComplete(nullptr, 0) {}
 
+    BackedgeTakenInfo(const BackedgeTakenInfo &) = delete;
+    BackedgeTakenInfo(BackedgeTakenInfo &&) = default;
+    BackedgeTakenInfo &operator=(BackedgeTakenInfo &&) = default;
+
     /// Initialize BackedgeTakenInfo from a list of exact exit counts.
     BackedgeTakenInfo(ArrayRef<EdgeExitInfo> ExitCounts, bool Complete,
                       const SCEV *MaxCount);