class AnalysisUsage;
class PassInfo;
class ImmutablePass;
-class BasicBlockPassManager;
-class ModulePassManager;
class PMStack;
class AnalysisResolver;
class PMDataManager;
}
// Access AnalysisResolver
- inline void setResolver(AnalysisResolver *AR) { Resolver = AR; }
- inline AnalysisResolver *getResolver() { return Resolver; }
+ inline void setResolver(AnalysisResolver *AR) {
+ assert (!Resolver && "Resolver is already set");
+ Resolver = AR;
+ }
+ inline AnalysisResolver *getResolver() {
+ assert (Resolver && "Resolver is not set");
+ return Resolver;
+ }
/// getAnalysisUsage - This function should be overriden by passes that need
/// analysis information to do their job. If a pass specifies that it uses a
///
virtual void releaseMemory() {}
+ /// verifyAnalysis() - This member can be implemented by a analysis pass to
+ /// check state of analysis information.
+ virtual void verifyAnalysis() const {}
+
// dumpPassStructure - Implement the -debug-passes=PassStructure option
virtual void dumpPassStructure(unsigned Offset = 0);
template<typename AnalysisClass>
static const PassInfo *getClassPassInfo() {
- return lookupPassInfo((intptr_t)&AnalysisClass::ID);
+ return lookupPassInfo(intptr_t(&AnalysisClass::ID));
}
// lookupPassInfo - Return the pass info object for the specified pass class,
/// ImmutablePasses are never run.
///
- virtual bool runOnModule(Module &M) { return false; }
+ bool runOnModule(Module &M) { return false; }
explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
// Force out-of-line virtual method.