diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-07-31 21:37:09 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-07-31 21:37:09 +0000 |
| commit | 47039dcfa97fa9fdb9d4333aace164bdbf0e25ab (patch) | |
| tree | 353c1d53080d3dd8bbfc413f7e29a231a90b075d /llvm/lib/Analysis | |
| parent | fef29821a78bd2f6c495949aa1a4c08ce7cf9548 (diff) | |
| download | bcm5719-llvm-47039dcfa97fa9fdb9d4333aace164bdbf0e25ab.tar.gz bcm5719-llvm-47039dcfa97fa9fdb9d4333aace164bdbf0e25ab.zip | |
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
llvm-svn: 243788
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DependenceAnalysis.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index 4826ac407d7..16e42ce6231 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -233,7 +233,8 @@ FullDependence::FullDependence(Instruction *Source, Instruction *Destination, : Dependence(Source, Destination), Levels(CommonLevels), LoopIndependent(PossiblyLoopIndependent) { Consistent = true; - DV = CommonLevels ? new DVEntry[CommonLevels] : nullptr; + if (CommonLevels) + DV = make_unique<DVEntry[]>(CommonLevels); } // The rest are simple getters that hide the implementation. @@ -3746,9 +3747,7 @@ DependenceAnalysis::depends(Instruction *Src, Instruction *Dst, return nullptr; } - auto Final = make_unique<FullDependence>(Result); - Result.DV = nullptr; - return std::move(Final); + return make_unique<FullDependence>(std::move(Result)); } |

