Settings

Theme

Ask HN: Any up to date tutorial on writing a basic compiler using LLVM in C?

1 points by mahdix 8 years ago · 2 comments · 1 min read


I tried a lot of resources by they are either for a different language (C++, OCaml, ...) or are not up to date so I cannot even run them with LLVM 5.

dozzie 8 years ago

Can you write a parser in C? Can you use a library in C? Because I don't think it's any different for LLVM than to combine the two (that is, if LLVM exposes C API at all). What problems exactly did you encounter?

  • mahdixOP 8 years ago

    I can write a parser in C and can use a library in C. LLVM exposes a C API but I could not find any type of documentation/sample/tutorial for using it. There are some articles on the Internet but (those that I tried) don't work with latest LLVM.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection