![](https://img-my.csdn.net/uploads/201304/01/1364798842_2947.png)
FunctionPass 主要增加
doInitaliztion() ;doFinalization();runOnFunction();
1.
bool FunctionPass::doInitialization(Module &) {
// By default, don't do anything.
return false;
}
bool FunctionPass::doFinalization(Module &) {
// By default, don't do anything.
return false;
}
PassManager.cpp
// Implement doInitialization and doFinalization
bool BBPassManager::doInitialization(Module &M) {
bool Changed = false;
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index)
Chang