Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease msc18 C2280.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 5 Mar 2015 01:25:06 +0000 (01:25 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 5 Mar 2015 01:25:06 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231334 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DependenceAnalysis.h
lib/Analysis/DependenceAnalysis.cpp

index 9169b7028b782efb9fff4ab8eabcca5d5f20a616..e01aa549099de35afc4848326ece7e5daa2ff23e 100644 (file)
@@ -221,6 +221,9 @@ namespace llvm {
                    Instruction *Dst,
                    bool LoopIndependent,
                    unsigned Levels);
                    Instruction *Dst,
                    bool LoopIndependent,
                    unsigned Levels);
+    ~FullDependence() {
+      delete[] DV;
+    }
 
     /// isLoopIndependent - Returns true if this is a loop-independent
     /// dependence.
 
     /// isLoopIndependent - Returns true if this is a loop-independent
     /// dependence.
@@ -267,7 +270,7 @@ namespace llvm {
     unsigned short Levels;
     bool LoopIndependent;
     bool Consistent; // Init to true, then refine.
     unsigned short Levels;
     bool LoopIndependent;
     bool Consistent; // Init to true, then refine.
-    std::unique_ptr<DVEntry[]> DV;
+    DVEntry *DV;
     friend class DependenceAnalysis;
   };
 
     friend class DependenceAnalysis;
   };
 
index d5d2fb2088c2ab45404ff759498f5c968f7a8525..393ee5c516a9875a1c997beee30825b4a999dc1b 100644 (file)
@@ -226,12 +226,16 @@ bool Dependence::isScalar(unsigned level) const {
 //===----------------------------------------------------------------------===//
 // FullDependence methods
 
 //===----------------------------------------------------------------------===//
 // FullDependence methods
 
-FullDependence::FullDependence(Instruction *Source, Instruction *Destination,
+FullDependence::FullDependence(Instruction *Source,
+                               Instruction *Destination,
                                bool PossiblyLoopIndependent,
                                bool PossiblyLoopIndependent,
-                               unsigned CommonLevels)
-    : Dependence(Source, Destination), Levels(CommonLevels),
-      LoopIndependent(PossiblyLoopIndependent), Consistent(true),
-      DV(CommonLevels ? new DVEntry[CommonLevels] : nullptr) {}
+                               unsigned CommonLevels) :
+  Dependence(Source, Destination),
+  Levels(CommonLevels),
+  LoopIndependent(PossiblyLoopIndependent) {
+  Consistent = true;
+  DV = CommonLevels ? new DVEntry[CommonLevels] : nullptr;
+}
 
 // The rest are simple getters that hide the implementation.
 
 
 // The rest are simple getters that hide the implementation.