aboutsummaryrefslogtreecommitdiffstats
path: root/tools/analyze/analyze.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-08 19:01:30 +0000
committerChris Lattner <sabre@nondot.org>2002-08-08 19:01:30 +0000
commit5f0eb8da62308126d5b61e3eee5bee75b9dc5194 (patch)
treebba3aeeee3028f7253ead1fce9c6e2be5167097e /tools/analyze/analyze.cpp
parentdd5b49512976df3225b67f9685642253186cde3d (diff)
downloadexternal_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.cpp12
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();
}
};