[cfe-dev] Bug: clang-cc -cfg-view

Eli Friedman eli.friedman at gmail.com
Mon Apr 26 21:19:19 PDT 2010


On Mon, Apr 26, 2010 at 6:43 PM, Micky J <micky686 at gmail.com> wrote:
> Hi,
> After checking out and building llvm ,
> running clang-cc on the program file.c
> simply does not produce any results.
>
> file.c:
> int main (int argc, char* argv[]) {
>
>
>   return 0;
> }
>
>
> Here is the run session:
>
> $ clang-cc -cfg-dump -v file.c
> clang-cc version 1.1 based upon llvm 2.7svn hosted on i386-pc-linux-gnu
> ignoring nonexistent directory "/System/Library/Frameworks"
> ignoring nonexistent directory "/Library/Frameworks"
> #include "..." search starts here:
> #include <...> search starts here:
>  /home/milj/downloads/src/llvm/llvm/Debug/lib/clang/1.1/include
>  /usr/local/include
>  /usr/include
> End of search list.
> ----------------------------------
>
> The -ast-dump and -ast-view options work perfectly, but the -cfg-dump and
> -cfg-view options do not.
> Does someone have any recommendations on how to get -cfg-dump and -cfg-view
> to work with clang-cc or
> for some other visualization alternatives of llvm code CFGs?

AFAIK, -cfg-dump only works in -analyze mode.

-Eli




More information about the cfe-dev mailing list