summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-11-21 09:10:21 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-11-21 09:10:21 +0000
commit212226e11498bc25af8b80375a3e0a49b13bdd03 (patch)
treef43650760d65cd33a87759cf032c43918e47b1eb /unittests
parent6345249972b73a400e31c0618c4d67411a0387e6 (diff)
downloadllvm-212226e11498bc25af8b80375a3e0a49b13bdd03.tar.gz
llvm-212226e11498bc25af8b80375a3e0a49b13bdd03.tar.bz2
llvm-212226e11498bc25af8b80375a3e0a49b13bdd03.tar.xz
[PM] Add support for using SFINAE to reflect on an analysis's result
type and detect whether or not it provides an 'invalidate' member the analysis manager should use. This lets the overwhelming common case of *not* caring about custom behavior when an analysis is invalidated be the the obvious default behavior with no code written by the author of an analysis. Only when they write code specifically to handle invalidation does it get used. Both cases are actually covered by tests here. The test analysis uses the default behavior, and the proxy module analysis actually has custom behavior on invalidation that is firing correctly. (In fact, this is the analysis which was the primary motivation for having custom invalidation behavior in the first place.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/IR/PassManagerTest.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp
index 7cb4f8d8b0..38ef1a4329 100644
--- a/unittests/IR/PassManagerTest.cpp
+++ b/unittests/IR/PassManagerTest.cpp
@@ -25,7 +25,6 @@ public:
struct Result {
Result(int Count) : InstructionCount(Count) {}
- bool invalidate(Function *) { return true; }
int InstructionCount;
};