Explorar o código

Make DT a transitive dependency of LI.

Summary:
LoopInfoWrapperPass::verify uses DT, which means DT must be alive
even if it has no direct users.

Fixes a crash in expensive checks mode.

Reviewers: pcc, leonardchan

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64896

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366388 91177308-0d34-0410-b5e6-96231b3b80d8
Evgeniy Stepanov %!s(int64=6) %!d(string=hai) anos
pai
achega
7ec9bee1d0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Analysis/LoopInfo.cpp

+ 1 - 1
lib/Analysis/LoopInfo.cpp

@@ -1039,7 +1039,7 @@ void LoopInfoWrapperPass::verifyAnalysis() const {
 
 
 void LoopInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
 void LoopInfoWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
   AU.setPreservesAll();
-  AU.addRequired<DominatorTreeWrapperPass>();
+  AU.addRequiredTransitive<DominatorTreeWrapperPass>();
 }
 }
 
 
 void LoopInfoWrapperPass::print(raw_ostream &OS, const Module *) const {
 void LoopInfoWrapperPass::print(raw_ostream &OS, const Module *) const {