summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-11-23 01:25:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-11-23 01:25:02 +0000
commit2ea1151162206f6bbc744fa008150ba6266da4d9 (patch)
tree80c2e2578e62c1addd2a18682196b6f3086ef448 /unittests
parenta3507d4883b8ec5fd068b28dda7e928f450ba883 (diff)
downloadllvm-2ea1151162206f6bbc744fa008150ba6266da4d9.tar.gz
llvm-2ea1151162206f6bbc744fa008150ba6266da4d9.tar.bz2
llvm-2ea1151162206f6bbc744fa008150ba6266da4d9.tar.xz
[PM] Rename TestAnalysisPass to TestFunctionAnalysis to clear the way
for a TestModuleAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/IR/PassManagerTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp
index cbfc3d2575..b3a9b7422a 100644
--- a/unittests/IR/PassManagerTest.cpp
+++ b/unittests/IR/PassManagerTest.cpp
@@ -19,7 +19,7 @@ using namespace llvm;
namespace {
-class TestAnalysisPass {
+class TestFunctionAnalysis {
public:
struct Result {
Result(int Count) : InstructionCount(Count) {}
@@ -29,7 +29,7 @@ public:
/// \brief Returns an opaque, unique ID for this pass type.
static void *ID() { return (void *)&PassID; }
- TestAnalysisPass(int &Runs) : Runs(Runs) {}
+ TestFunctionAnalysis(int &Runs) : Runs(Runs) {}
/// \brief Run the analysis pass over the function and return a result.
Result run(Function *F, FunctionAnalysisManager *AM) {
@@ -49,7 +49,7 @@ private:
int &Runs;
};
-char TestAnalysisPass::PassID;
+char TestFunctionAnalysis::PassID;
struct TestModulePass {
TestModulePass(int &RunCount) : RunCount(RunCount) {}
@@ -94,12 +94,12 @@ struct TestFunctionPass {
if (OnlyUseCachedResults) {
// Hack to force the use of the cached interface.
- if (const TestAnalysisPass::Result *AR =
- AM->getCachedResult<TestAnalysisPass>(F))
+ if (const TestFunctionAnalysis::Result *AR =
+ AM->getCachedResult<TestFunctionAnalysis>(F))
AnalyzedInstrCount += AR->InstructionCount;
} else {
// Typical path just runs the analysis as needed.
- const TestAnalysisPass::Result &AR = AM->getResult<TestAnalysisPass>(F);
+ const TestFunctionAnalysis::Result &AR = AM->getResult<TestFunctionAnalysis>(F);
AnalyzedInstrCount += AR.InstructionCount;
}
@@ -153,7 +153,7 @@ public:
TEST_F(PassManagerTest, Basic) {
FunctionAnalysisManager FAM;
int AnalysisRuns = 0;
- FAM.registerPass(TestAnalysisPass(AnalysisRuns));
+ FAM.registerPass(TestFunctionAnalysis(AnalysisRuns));
ModuleAnalysisManager MAM;
MAM.registerPass(FunctionAnalysisManagerModuleProxy(FAM));