summaryrefslogtreecommitdiff
path: root/unittests/Analysis/CFGTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Analysis/CFGTest.cpp')
-rw-r--r--unittests/Analysis/CFGTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/unittests/Analysis/CFGTest.cpp b/unittests/Analysis/CFGTest.cpp
index 88c4b00e76..76514f4d89 100644
--- a/unittests/Analysis/CFGTest.cpp
+++ b/unittests/Analysis/CFGTest.cpp
@@ -78,14 +78,15 @@ protected:
"", &ID, 0, true, true);
PassRegistry::getPassRegistry()->registerPass(*PI, false);
initializeLoopInfoPass(*PassRegistry::getPassRegistry());
- initializeDominatorTreePass(*PassRegistry::getPassRegistry());
+ initializeDominatorTreeWrapperPassPass(
+ *PassRegistry::getPassRegistry());
return 0;
}
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequired<LoopInfo>();
- AU.addRequired<DominatorTree>();
+ AU.addRequired<DominatorTreeWrapperPass>();
}
bool runOnFunction(Function &F) {
@@ -93,7 +94,8 @@ protected:
return false;
LoopInfo *LI = &getAnalysis<LoopInfo>();
- DominatorTree *DT = &getAnalysis<DominatorTree>();
+ DominatorTree *DT =
+ &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
EXPECT_EQ(isPotentiallyReachable(A, B, 0, 0), ExpectedResult);
EXPECT_EQ(isPotentiallyReachable(A, B, DT, 0), ExpectedResult);
EXPECT_EQ(isPotentiallyReachable(A, B, 0, LI), ExpectedResult);