[cfe-dev] how to get the CFG information in a new analysis action?
redder_0210
redder_0210 at yeah.net
Tue Nov 22 01:13:24 PST 2011
Dear All,
I want to add a command option in Clang to analyze the cfg information.
I have modified the Driver of Clang. Also, the CompilerInstance has been modified partly.
In the directory "lib\frontendtool\ExecuteCompilerInvocation.cpp", I add some codes as follows(with the color red):
static FrontendAction * CreateFrontendBaseAction(CompilerInstance &CI){
........
........
case RunANewAnalysis: ////////this case is added by myself
return new ento::NewAnalysisAction();
.......
.......
}
Now my question is that who(which class or object) deals with the new action.
Then how should I do to get the cfg information?
PS:
I also create the NewAnalysisAction with the return value *ASTConsumer.
But I have no idea that how to deal with the ASTConsumer, and how to translate to cfg then.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111122/8b630621/attachment.html>
More information about the cfe-dev
mailing list