That does not work for me<br><br>Code: <a href="https://gist.github.com/1023214">https://gist.github.com/1023214</a><br>Test program I'm using: <a href="https://gist.github.com/1023217">https://gist.github.com/1023217</a><br>
Loading the pluggin and calling the compiler: clang -cc1 -load ~/llvm/Release+Asserts/lib/libPrintFunctionNames.so -plugin print-fns test2.c<br><br>Thanks<br><br><div class="gmail_quote">On Mon, Jun 13, 2011 at 1:07 PM, Joshua Cranmer <span dir="ltr"><<a href="mailto:Pidgeot18@verizon.net">Pidgeot18@verizon.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 6/13/2011 9:54 AM, ret val wrote:<br>
> Tried that first in another thread actually. It wasn't going anywhere.<br>
> though...<br>
><br>
> Anyway Ive been modification the Print Functions<br>
> example(llvm/tools/clang/examples) and besides from the inheritence<br>
> and implementing one function I'm not sure what else is required. Here<br>
> it is <a href="https://gist.github.com/1015907" target="_blank">https://gist.github.com/1015907</a><br>
><br>
<br>
</div>If I make the class the following, i can get it to work:<br>
class PrintFunctionsConsumer : public ASTConsumer, public<br>
RecursiveASTVisitor<PrintFunctionsConsumer> {<br>
public:<br>
   bool VisitCallExpr (CallExpr *E) {<br>
     llvm::errs() << "Function call maybe?!";<br>
     return true;<br>
   }<br>
   virtual void HandleTranslationUnit(ASTContext &ctx) {<br>
     TraverseDecl(ctx.getTranslationUnitDecl());<br>
   }<br>
};<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br>