<div dir="ltr"><div style><div style><div>Hi All,</div><div><br></div><div>I tried seeing the AST contents in by using following command:</div><div><br></div><div>clang -Xclang -ast-dump -fsyntax-only loop.c</div><div><br></div><div>This is giving me some AST output( I believe so) but I am having two issue:</div><div><br></div><div>1. I am not able to put this output in a file as Its showing following error:</div><div><br></div><div>yaduveer@yaduveer-Inspiron-3542:~/RP$ clang -Xclang -ast-dump -fsyntax-only loop1d.c | llvm-dis -o ast.txt</div><div>llvm-dis: Invalid bitcode signature</div><div>clang: error: unable to execute command: Broken pipe</div><div>clang: error: clang frontend command failed due to signal (use -v to see invocation)</div><div>clang version 3.6.0 (trunk 225627) (llvm/trunk 225626)</div><div>Target: x86_64-unknown-linux-gnu</div><div>Thread model: posix</div><div>clang: note: diagnostic msg: PLEASE submit a bug report to <a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and associated run script.</div><div>clang: note: diagnostic msg: </div><div>********************</div><div><br></div><div>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:</div><div>Preprocessed source(s) and associated run script(s) are located at:</div><div>clang: note: diagnostic msg: /tmp/loop1d-71cd19.c</div><div>clang: note: diagnostic msg: /tmp/loop1d-71cd19.sh</div><div>clang: note: diagnostic msg: </div><div><br></div><div>********************</div><div><br></div><div><div style="font-size:12.8000001907349px">Could someone please advise me on following queries:</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">a) Is there some way so that I can get dependency analysis of AST and  Basic Blocks. </div><div style="font-size:12.8000001907349px">b) How can I modify an existing pass by writing a new Pass just like  "Hello" pass but the dependencies involved in that pass must not show error like "redeclaration".</div></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Regards,</div><div style="font-size:12.8000001907349px">Yaduveer</div></div></div>
</div>