[cfe-dev] CFG::dump in clang
Ted Kremenek
kremenek at apple.com
Sun Dec 12 17:29:41 PST 2010
-cfg-dump is a internal driver (-cc1) option, not part of the "public" compiler driver interface. It is also tied to -analyze. Try:
clang -cc1 -analyze -cfg-dump test.c
On Dec 12, 2010, at 4:48 PM, Surinder J wrote:
> I want to obtain a dump of CFG for a simple foo program
>
> #include <stdio.h>
> int main() {
> printf("Hello, World!\n");
> }
> I have tried the command
>
> clang -cfg-dump foo.c
>
> It gives a warning and ignores -cfg-dump option.
>
> Also, if it is unable to link edit the program. when I give the command
>
> clang foo.c
>
> It gives an error
>
> /usr/bin/ld: crtbegin.o: No such file: No such file or directory
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
> Running with -v option gives the error
>
> /usr/bin/ld: crtbegin.o: No such file: No such file or directory
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> Any help to dump cfg would be appreciated.
>
> Surinder
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list