Hey all...<br><br>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<br>
<br>namespace {<br> // Hello - The first implementation, without getAnalysisUsage.<br> struct Test2 : public FunctionPass {<br> static char ID; // Pass identification, replacement for typeid<br> Test2() : FunctionPass (&ID) {}<br>
<br> virtual bool runOnFunction(Function &BB) {<br> errs() << "Test1: "<<BB.getName()<<" ";<br> if (BB.empty())<br> errs()<<"true"<<"\n";<br>
else <br> errs()<<"false"<<"\n";<br> return false;<br> }<br> };<br>}<br><br><br>