diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-11-22 12:11:02 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-11-22 12:11:02 +0000 |
commit | 5f347a9bd1ba861c9f243b540449761b91c4692f (patch) | |
tree | 5e4e5cd4cbe937f59b289dd1ec59ffab96b58320 /unittests/IR | |
parent | 1fe44e4beff771a09992d8502cc54fad654771e7 (diff) | |
download | llvm-5f347a9bd1ba861c9f243b540449761b91c4692f.tar.gz llvm-5f347a9bd1ba861c9f243b540449761b91c4692f.tar.bz2 llvm-5f347a9bd1ba861c9f243b540449761b91c4692f.tar.xz |
[PM] Teach the analysis managers to pass themselves as arguments to the
run methods of the analysis passes.
Also generalizes and re-uses the SFINAE for transformation passes so
that users can write an analysis pass and only accept an analysis
manager if that is useful to their pass.
This completes the plumbing to make an analysis manager available
through every pass's run method if desired so that passes no longer need
to be constructed around them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r-- | unittests/IR/PassManagerTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp index b0d4cbe031..8115da862d 100644 --- a/unittests/IR/PassManagerTest.cpp +++ b/unittests/IR/PassManagerTest.cpp @@ -32,7 +32,7 @@ public: TestAnalysisPass(int &Runs) : Runs(Runs) {} /// \brief Run the analysis pass over the function and return a result. - Result run(Function *F) { + Result run(Function *F, FunctionAnalysisManager *AM) { ++Runs; int Count = 0; for (Function::iterator BBI = F->begin(), BBE = F->end(); BBI != BBE; ++BBI) |