llvm-bindings
llvm-bindings copied to clipboard
LLVM 16
I added support for LLVM 16. In an effort to make future porting a little easier, I made use of the llvm/IR/Attributes.inc
where attributes are defined. The attribute declaration macros are overridden to have the preprocessor register the attributes for us.
The TS declaration are also passed through the preprocessor so that they are also updated from version to version.
I also added an override to <assert.h> that throws a NodeJS error by default so that its easier to debug LLVM assertion failures in the JS context
Thanks for your contribution! I will review this PR within 3days.
@Kronos3 Really nice! Do you plan to do the same for higher versions of LLVM (currently 18 is released)? :)
@ApsarasX I noticed that you are over the 3 days already. What are the challenges with the review? Do you find the time? This is a very interesting contribution for me.
@Lotes The main work to port to LLVM 18 I believe would be to remove the non-opaque pointer API entirely so I don't envision it to be to difficult. If you need it I'd recommend just installing LLVM 18 and working through the compilation errors. This port took about 3 hours for reference.
I ended up not using this library since it was missing too much out of the full LLVM API which ended up becoming cumbersome while developing my frontend.
@Kronos3, thanks for your PR on upgrading to LLVM 16. We are really interested in this and look forward to the review and merge by @ApsarasX.
I ended up not using this library since it was missing too much out of the full LLVM API which ended up becoming cumbersome while developing my frontend.
Could you tell how you use LLVM, what parts of the LLVM API you are missing, and what workaround you found?
@ApsarasX, thanks for the library, it's a good connection of the worlds of TS and LLVM 👍
What are your plans for llvm-bindings
? My team uses it extensively and we are considering helping / taking over maintenance. Could we discuss it?
Here is our fork that adds DIBuilder::createArrayType
and DIBuilder::createStructType
.