<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 12, 2014 at 1:10 PM, Jeremy Salwen <span dir="ltr"><<a href="mailto:jeremysalwen@gmail.com" target="_blank">jeremysalwen@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello all,<br><br></div>I'm trying to follow the guide <a href="http://llvm.org/docs/WritingAnLLVMPass.html" target="_blank">http://llvm.org/docs/WritingAnLLVMPass.html</a> to build an some passes and analysis groups out of tree. However, I'm having some trouble with crashes when I try to follow the guide.  <br>



The first section provides a very useful example of what the whole .cpp file should look like for the HelloWorld pass.  Obviously it's a bit more complex to write the whole setup with an analysis group, an analysis pass, and a transform pass that uses the analysis, but example code would be extremely helpful, and could serve as a good starting point for anyone who wants to do something similar.  Is there anywhere i could find such example code, perhaps as part of a project, that demonstrates how to define and use an analysis group out of tree?<br>

</div></div></div></blockquote><div><br></div><div>It's not entirely clear which part you're having a problem with. If it's creating an analysis group, there should be samples within the LLVM source code. If it's building out-of-tree, take a look at <a href="https://github.com/eliben/llvm-clang-samples">https://github.com/eliben/llvm-clang-samples</a> -- it's a repository with a bunch of LLVM/Clang samples, all built out of tree. It keeps pretty close track to ToT, as well as having branches for prior releases (3.3 and 3.4, for now).</div>

<div><br></div><div>Eli</div><div> </div></div><br></div></div>