aboutsummaryrefslogtreecommitdiff
path: root/unittests/IR/PassManagerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/IR/PassManagerTest.cpp')
-rw-r--r--unittests/IR/PassManagerTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp
index ad06cc4778fe..0131bce3d2b2 100644
--- a/unittests/IR/PassManagerTest.cpp
+++ b/unittests/IR/PassManagerTest.cpp
@@ -210,6 +210,13 @@ TEST(PreservedAnalysesTest, Basic) {
EXPECT_FALSE(PAC.preserved());
EXPECT_FALSE(PAC.preservedSet<AllAnalysesOn<Function>>());
}
+ auto PA5 = PreservedAnalyses::allInSet<AllAnalysesOn<Function>>();
+ {
+ auto PAC = PA5.getChecker<TestFunctionAnalysis>();
+ EXPECT_FALSE(PAC.preserved());
+ EXPECT_TRUE(PAC.preservedSet<AllAnalysesOn<Function>>());
+ EXPECT_FALSE(PAC.preservedSet<AllAnalysesOn<Module>>());
+ }
}
TEST(PreservedAnalysesTest, Preserve) {