<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I am newbie to LLVM. I wish to write an analysis pass. I followed the steps mentioned in the site.<br></div>First I downloaded the source files to, say src, folder. <br>
</div>Then I built it in another folder, say build.<br></div>Everything went well.<br></div>Then I wrote a HelloWorld pass (as mentioned in the site). But then encountered make errors.<br><br></div>I did a bit of googling and realised that the issue is with separate directories for src and build. To overcome this issue I came up with two 'solutions':<br>
</div>1. redo the whole process of compiling llvm source by having source and build in the same directory.<br></div>2. Have two directories - src and build (as mentioned in the site) - write your (new) pass in relevant file in src directory. Then after you run make on this (new) pass, copy the library thus created in src/Debug+Asserts/lib to build/Debug+Asserts/lib .<br clear="all">
<div><div><div><div><div><div><div><div><div><br></div><div>Would like to know which is a better solution? (Or suggest me a much better than these.) My concerns are thus :<br> - I am expecting to write a complex analysis pass which depends on the existing passes.<br>
</div><div> - This is a long term project. Hence would like to opt for a clean solution than a quick-fix one.<br><br></div><div>--<br></div><div>Regards, <br></div><div>Rekha
</div></div></div></div></div></div></div></div></div></div>