Can anyone please let me know if there is any books / offline study
material / online study materials / documents / code examples for
usage of LLVM and CLANG?
Unfortunately all of my offline / online search is leading me to no
results. This I see as a bottleneck also for its usage.
I understand that CLANG is really very powerful compiler but I am
unable to explore its functionalities due to lack of knowledge /
expertise and guidance.
Please help and thanks in advance.
Regards,
Prakash
Can anyone please let me know if there is any books / offline study
material / online study materials / documents / code examples for
usage of LLVM and CLANG?
Unfortunately all of my offline / online search is leading me to no
results. This I see as a bottleneck also for its usage.
I understand that CLANG is really very powerful compiler but I am
unable to explore its functionalities due to lack of knowledge /
expertise and guidance.
The LLVM and Clang websites are the best place to find documentation.
LLVM documentation can be found online at http://llvm.org/docs. Clang has a user's manual at http://clang.llvm.org/docs/UsersManual.html and an internals manual at http://clang.llvm.org/docs/InternalsManual.html. If you're coding for LLVM and/or Clang, be sure to use the doxygen documentation to get information on C++ classes that you can use to manipulate the IR.
If you want code examples, there's the analysis passes in LLVM (e.g. llvm/lib/Analysis and llvm/lib/Transforms) as well as the code in the various sub-projects like Poolalloc and SAFECode. There are probably similar code examples in Clang.
If you just want to use Clang, remember that it's a drop-in replacement for GCC, so many of GCC's command-line options should work.
-- John T.