Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This may be a little off-topic but does anyone know a good and up-to-date tutorial for using LLVM in C language?


LLVM's C is compiler clang. You can find it from

http://clang.llvm.org/

In many cases it's just drop-in replacement for gcc.


I rather understood it that they wanted to know whether there is a C API to use LLVM, so perhaps something like this: https://pauladamsmith.com/blog/2015/01/how-to-get-started-wi...


That's exactly what I am looking for but it's almost two years old and I think I tried it a few months back and got lots of errors. I was hoping to find a more up-to-date tutorial. Unfortunately LLVM people don't pay much attention to documentation and tutorials for their product.


I've been there.

Pretty much the only way is to just read the C api header and figure things out from there.

It does contain comments, which are mostly helpful, but sometimes incomplete or out of date.


This series may also be relevant, but I never read it in full: https://msm.runhello.com/p/category/plt/no-compiler.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: