[cfe-dev] Generate the whole program CFG?
Douglas Gregor
dgregor at apple.com
Fri Sep 11 07:55:16 PDT 2009
On Sep 11, 2009, at 4:28 AM, zhunan wrote:
> Hi,all
>
> Since the CFGs generated by clang-cc are for single function,can we
> generate a large CFG for the whole program(we expand the callee's
> CFG in
> the main function's CFG)?
>
>
> 1.Has clang offered this function?
There has been a little bit of work in Clang to provide whole-program
CFGs. See include/clang/Analysis/CallGraph.h and the "clang-wpa"
program (in tools/wpa).
> 2.what we should modify?(It seems that ASTs are also for single
> function)
Each ASTContext holds a single translation unit. A program is made up
of several translation units.
- Doug
More information about the cfe-dev
mailing list