aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/Analysis/CFGTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Analysis/CFGTest.cpp')
-rw-r--r--unittests/Analysis/CFGTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/Analysis/CFGTest.cpp b/unittests/Analysis/CFGTest.cpp
index dba9d49..4b4ebb6 100644
--- a/unittests/Analysis/CFGTest.cpp
+++ b/unittests/Analysis/CFGTest.cpp
@@ -16,7 +16,7 @@
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
@@ -72,7 +72,7 @@ protected:
PassInfo *PI = new PassInfo("isPotentiallyReachable testing pass",
"", &ID, nullptr, true, true);
PassRegistry::getPassRegistry()->registerPass(*PI, false);
- initializeLoopInfoPass(*PassRegistry::getPassRegistry());
+ initializeLoopInfoWrapperPassPass(*PassRegistry::getPassRegistry());
initializeDominatorTreeWrapperPassPass(
*PassRegistry::getPassRegistry());
return 0;
@@ -80,7 +80,7 @@ protected:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
- AU.addRequired<LoopInfo>();
+ AU.addRequired<LoopInfoWrapperPass>();
AU.addRequired<DominatorTreeWrapperPass>();
}
@@ -88,7 +88,7 @@ protected:
if (!F.hasName() || F.getName() != "test")
return false;
- LoopInfo *LI = &getAnalysis<LoopInfo>();
+ LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
DominatorTree *DT =
&getAnalysis<DominatorTreeWrapperPass>().getDomTree();
EXPECT_EQ(isPotentiallyReachable(A, B, nullptr, nullptr),
@@ -107,7 +107,7 @@ protected:
IsPotentiallyReachableTestPass *P =
new IsPotentiallyReachableTestPass(ExpectedResult, A, B);
- PassManager PM;
+ legacy::PassManager PM;
PM.add(P);
PM.run(*M);
}