[cfe-dev] -parse-ast-view

Michael Marcin mmarcin at method-solutions.com
Thu Sep 20 18:24:47 PDT 2007


Chris Lattner wrote:
> On Sep 19, 2007, at 5:24 PM, Chris Lattner wrote:
> 
>> FYI, with Ted's latest changes, we can now use -parse-ast-view to  
>> look at ASTs.  If you have graphviz set up right, you should see  
>> something like this:
> 
> BTW, in order for this to work, you have to have dot or Graphviz  
> installed correctly, instructions are here:
> http://llvm.org/docs/ProgrammersManual.html#ViewGraph
> 
> One of the nice things about this is that you can just use things  
> like "call S->viewAST()" in GDB and a window pops up with the  
> subgraph for S.
> 
> -Chris
> 
>> <pastedGraphic.png>
>>
>> for
>>
>> void foo(int *P, int N) {
>>   for (int i = 0; i != N; ++i)
>>     P[i] = N;
>> }
>>
>> nifty!
>>
>> Over time, more info will be added to the nodes.
>>

Wow this is really cool.

- Michael Marcin




More information about the cfe-dev mailing list