summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/PassManagerTest.cpp
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
commitf6e9986a41381035478af0622d732bd6900218df (patch)
treeb6a86403d3151476bc2c31e6f4d49c13511cb993 /llvm/unittests/IR/PassManagerTest.cpp
parent53c51a167573551f200de11ad682d5dd1c3dd914 (diff)
downloadbcm5719-llvm-f6e9986a41381035478af0622d732bd6900218df.tar.gz
bcm5719-llvm-f6e9986a41381035478af0622d732bd6900218df.zip
[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.) llvm-svn: 195332
Diffstat (limited to 'llvm/unittests/IR/PassManagerTest.cpp')
-rw-r--r--llvm/unittests/IR/PassManagerTest.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp
index 7cb4f8d8b03..38ef1a43290 100644
--- a/llvm/unittests/IR/PassManagerTest.cpp
+++ b/llvm/unittests/IR/PassManagerTest.cpp
@@ -25,7 +25,6 @@ public:
struct Result {
Result(int Count) : InstructionCount(Count) {}
- bool invalidate(Function *) { return true; }
int InstructionCount;
};
OpenPOWER on IntegriCloud