summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-11 11:52:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-11 11:52:05 +0000
commitb56749c3b7bd3867d5a500b9882decd957244620 (patch)
treee20a9070e3aa16ad2092503b4f51f7f5bdc48857 /unittests
parentd55b5fe9920554cebf5976316915bb07165734b4 (diff)
downloadllvm-b56749c3b7bd3867d5a500b9882decd957244620.tar.gz
llvm-b56749c3b7bd3867d5a500b9882decd957244620.tar.bz2
llvm-b56749c3b7bd3867d5a500b9882decd957244620.tar.xz
[PM] Add names to passes under the new pass manager, and a debug output
mode that can be used to debug the execution of everything. No support for analyses here, that will come later. This already helps show parts of the opt commandline integration that isn't working. Tests of that will start using it as the bugs are fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/IR/PassManagerTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp
index 8db9c67e7d..7b2b46a934 100644
--- a/unittests/IR/PassManagerTest.cpp
+++ b/unittests/IR/PassManagerTest.cpp
@@ -86,6 +86,8 @@ struct TestModulePass {
return PreservedAnalyses::none();
}
+ static StringRef name() { return "TestModulePass"; }
+
int &RunCount;
};
@@ -93,6 +95,8 @@ struct TestPreservingModulePass {
PreservedAnalyses run(Module *M) {
return PreservedAnalyses::all();
}
+
+ static StringRef name() { return "TestPreservingModulePass"; }
};
struct TestMinPreservingModulePass {
@@ -105,6 +109,8 @@ struct TestMinPreservingModulePass {
PA.preserve<FunctionAnalysisManagerModuleProxy>();
return PA;
}
+
+ static StringRef name() { return "TestMinPreservingModulePass"; }
};
struct TestFunctionPass {
@@ -138,6 +144,8 @@ struct TestFunctionPass {
return PreservedAnalyses::all();
}
+ static StringRef name() { return "TestFunctionPass"; }
+
int &RunCount;
int &AnalyzedInstrCount;
int &AnalyzedFunctionCount;
@@ -154,6 +162,8 @@ struct TestInvalidationFunctionPass {
: PreservedAnalyses::all();
}
+ static StringRef name() { return "TestInvalidationFunctionPass"; }
+
StringRef Name;
};