Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm planning a compiler project and LLVM has come up as the most sensible approach to creating the back end. I want to build the entire system in C#. The front end is not a problem, Antlr4 generates C# parsers so that's good but I don't know much at all about LLVM or if there's anything important missing from LLVMSharp that could cause a problem.

Also is this up to date, does it reflect a reasonably recent version of the actual LLVM API?

You must be logged in to vote

there's anything important missing from LLVMSharp that could cause a problem.

LLVMSharp is simply bindings over the official LLVM-C library provided by LLVM themselves. LLVM-C is not as feature complete or comprehensive as the main LLVM API and while the vast majority of important features are there, there are bits "missing".

ClangSharp makes up for this by providing libClangSharp to fill in the gaps. I have plans on providing a similar libLLVMSharp but haven't had time to actually implement that yet.

Also is this up to date, does it reflect a reasonably recent version of the actual LLVM API?

It's currently v16.0.0 while the latest official version of LLVM is v18.0.0 and was released …

Replies: 1 comment · 1 reply

Comment options

there's anything important missing from LLVMSharp that could cause a problem.

LLVMSharp is simply bindings over the official LLVM-C library provided by LLVM themselves. LLVM-C is not as feature complete or comprehensive as the main LLVM API and while the vast majority of important features are there, there are bits "missing".

ClangSharp makes up for this by providing libClangSharp to fill in the gaps. I have plans on providing a similar libLLVMSharp but haven't had time to actually implement that yet.

Also is this up to date, does it reflect a reasonably recent version of the actual LLVM API?

It's currently v16.0.0 while the latest official version of LLVM is v18.0.0 and was released last month. It doesn't take much to update since the bindings are just directly generated, I just haven't had time to update as indicated above.

LLVM ships a new major version every 6 months or so and that generally includes binary breaking changes, so many devs opt to not stay on the bleeding edge.

You must be logged in to vote
1 reply
@ds5678
Comment options

I have plans on providing a similar libLLVMSharp but haven't had time to actually implement that yet.

I'd be willing to help out with this. I've noticed that when parsing IR, there doesn't seem to be an easy way to get a function's return type. I think it's only exposed in the C++ library.

Answer selected by The-Futurist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.