diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-08 19:01:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-08 19:01:30 +0000 |
commit | 5f0eb8da62308126d5b61e3eee5bee75b9dc5194 (patch) | |
tree | bba3aeeee3028f7253ead1fce9c6e2be5167097e /tools/analyze/analyze.cpp | |
parent | dd5b49512976df3225b67f9685642253186cde3d (diff) | |
download | external_llvm-5f0eb8da62308126d5b61e3eee5bee75b9dc5194.zip external_llvm-5f0eb8da62308126d5b61e3eee5bee75b9dc5194.tar.gz external_llvm-5f0eb8da62308126d5b61e3eee5bee75b9dc5194.tar.bz2 |
- Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/analyze/analyze.cpp')
-rw-r--r-- | tools/analyze/analyze.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp index f6a88c1..a40b8b8 100644 --- a/tools/analyze/analyze.cpp +++ b/tools/analyze/analyze.cpp @@ -25,14 +25,14 @@ struct ModulePassPrinter : public Pass { virtual bool run(Module &M) { std::cout << "Printing Analysis info for Pass " << PassToPrint->getPassName() << ":\n"; - getAnalysis<Pass>(PassToPrint).print(std::cout, &M); + getAnalysisID<Pass>(PassToPrint).print(std::cout, &M); // Get and print pass... return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(PassToPrint); + AU.addRequiredID(PassToPrint); AU.setPreservesAll(); } }; @@ -44,14 +44,14 @@ struct FunctionPassPrinter : public FunctionPass { virtual bool runOnFunction(Function &F) { std::cout << "Printing Analysis info for function '" << F.getName() << "': Pass " << PassToPrint->getPassName() << ":\n"; - getAnalysis<Pass>(PassToPrint).print(std::cout, F.getParent()); + getAnalysisID<Pass>(PassToPrint).print(std::cout, F.getParent()); // Get and print pass... return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(PassToPrint); + AU.addRequiredID(PassToPrint); AU.setPreservesAll(); } }; @@ -63,14 +63,14 @@ struct BasicBlockPassPrinter : public BasicBlockPass { virtual bool runOnBasicBlock(BasicBlock &BB) { std::cout << "Printing Analysis info for BasicBlock '" << BB.getName() << "': Pass " << PassToPrint->getPassName() << ":\n"; - getAnalysis<Pass>(PassToPrint).print(std::cout, BB.getParent()->getParent()); + getAnalysisID<Pass>(PassToPrint).print(std::cout, BB.getParent()->getParent()); // Get and print pass... return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(PassToPrint); + AU.addRequiredID(PassToPrint); AU.setPreservesAll(); } }; |