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 | f2edc07571ae376ea97ae963b6ac0fb8e762ec2e (patch) | |
tree | 671314151099af98f983cba02f2940585316e615 /llvm/unittests/IR/PassManagerTest.cpp | |
parent | 71ec5a64ddb3a37ac3347f1f3b9e93e8bd22d1ef (diff) | |
download | bcm5719-llvm-f2edc07571ae376ea97ae963b6ac0fb8e762ec2e.tar.gz bcm5719-llvm-f2edc07571ae376ea97ae963b6ac0fb8e762ec2e.zip |
[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.
llvm-svn: 195451
Diffstat (limited to 'llvm/unittests/IR/PassManagerTest.cpp')
-rw-r--r-- | llvm/unittests/IR/PassManagerTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp index b0d4cbe0318..8115da862dc 100644 --- a/llvm/unittests/IR/PassManagerTest.cpp +++ b/llvm/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) |