Hey all…
I was writing a Function pass to print all the functions using runonFunction() method .but it is printing one global variable “x” at the same time which i just dont know how is getting there.how can i avoid “x” from printing?? . Here is the framgment of code of my pass
namespace {
// Hello - The first implementation, without getAnalysisUsage.
struct Test2 : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
Test2() : FunctionPass (&ID) {}
virtual bool runOnFunction(Function &BB) {
errs() << “Test1: “<<BB.getName()<<” “;
if (BB.empty())
errs()<<“true”<<”\n”;
else
errs()<<“false”<<“\n”;
return false;
}
};
}