forked from OSchip/llvm-project
parent
940863bd22
commit
c2be148276
|
@ -25,8 +25,7 @@ struct ModulePassPrinter : public Pass {
|
||||||
ModulePassPrinter(const PassInfo *PI) : PassToPrint(PI) {}
|
ModulePassPrinter(const PassInfo *PI) : PassToPrint(PI) {}
|
||||||
|
|
||||||
virtual bool run(Module &M) {
|
virtual bool run(Module &M) {
|
||||||
std::cout << "Printing Analysis info for Pass "
|
std::cout << "Printing analysis '" << PassToPrint->getPassName() << "':\n";
|
||||||
<< PassToPrint->getPassName() << ":\n";
|
|
||||||
getAnalysisID<Pass>(PassToPrint).print(std::cout, &M);
|
getAnalysisID<Pass>(PassToPrint).print(std::cout, &M);
|
||||||
|
|
||||||
// Get and print pass...
|
// Get and print pass...
|
||||||
|
@ -46,8 +45,8 @@ struct FunctionPassPrinter : public FunctionPass {
|
||||||
FunctionPassPrinter(const PassInfo *PI) : PassToPrint(PI) {}
|
FunctionPassPrinter(const PassInfo *PI) : PassToPrint(PI) {}
|
||||||
|
|
||||||
virtual bool runOnFunction(Function &F) {
|
virtual bool runOnFunction(Function &F) {
|
||||||
std::cout << "Printing Analysis info for function '" << F.getName()
|
std::cout << "Printing analysis '" << PassToPrint->getPassName()
|
||||||
<< "': Pass " << PassToPrint->getPassName() << ":\n";
|
<< "' for function '" << F.getName() << "':\n";
|
||||||
getAnalysisID<Pass>(PassToPrint).print(std::cout, F.getParent());
|
getAnalysisID<Pass>(PassToPrint).print(std::cout, F.getParent());
|
||||||
|
|
||||||
// Get and print pass...
|
// Get and print pass...
|
||||||
|
|
Loading…
Reference in New Issue