diff options
Diffstat (limited to 'lib/VMCore/Pass.cpp')
-rw-r--r-- | lib/VMCore/Pass.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index d831560993..fb751b5db0 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -22,7 +22,7 @@ // static std::vector<AnalysisID> CFGOnlyAnalyses; - +#if 0 // Source of unique analysis ID #'s. unsigned AnalysisID::NextID = 0; @@ -35,6 +35,7 @@ AnalysisID::AnalysisID(const AnalysisID &AID, bool DependsOnlyOnCFG) { if (DependsOnlyOnCFG) CFGOnlyAnalyses.push_back(AID); } +#endif //===----------------------------------------------------------------------===// // AnalysisResolver Class Implementation @@ -190,7 +191,8 @@ void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg, if (PassDebugging >= Details && !Set.empty()) { std::cerr << (void*)P << std::string(Depth*2+3, ' ') << Msg << " Analyses:"; for (unsigned i = 0; i != Set.size(); ++i) { - Pass *P = Set[i].createPass(); // Good thing this is just debug code... + // FIXME: This can use the local pass map! + Pass *P = Set[i]->createPass(); // Good thing this is just debug code... std::cerr << " " << P->getPassName(); delete P; } @@ -217,6 +219,19 @@ void Pass::addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU) { // const char *Pass::getPassName() const { return typeid(*this).name(); } +// print - Print out the internal state of the pass. This is called by Analyse +// to print out the contents of an analysis. Otherwise it is not neccesary to +// implement this method. +// +void Pass::print(std::ostream &O) const { + O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n"; +} + +// dump - call print(std::cerr); +void Pass::dump() const { + print(std::cerr, 0); +} + //===----------------------------------------------------------------------===// // FunctionPass Implementation // |