Hacker News new | ask | show | jobs
by eridius 3341 days ago
You can't enforce type safety at the IR level. LLVM IR has very little in the way of type information.
1 comments

I've been manually writing some LLVM IR recently to prepare for a project involving JIT compilation, and LLVM's type system is actually shockingly expressive. The majority of the problems I run into are the fact that you have to copy-paste more often and that leads to errors.

I wouldn't recommend anyone write real code using LLVM IR, but it's not as bad as you'd expect.