cdisselkoen / llvm-ir

LLVM IR in natural Rust data structures
MIT License
539 stars 45 forks source link

Update to support LLVM 17 #55

Closed Benjins closed 8 months ago

Benjins commented 8 months ago

Mostly going off of what changes https://github.com/cdisselkoen/llvm-ir/pull/39 made

This is an initial supporting of LLVM 17 to keep it lighter. The API changes don't seem that substantial, though NSW/NUW/Exact flags are now accessible via the C API. That can be done in a follow-up. The only API change was using LLVMGetArrayLength2 when it's available, since LLVMGetArrayLength is now deprecated

Tested locally using LLVM 17.0.6 and llvm-sys 170.0.1. Will double-check CI when it runs

Other resources:

cdisselkoen commented 8 months ago

Added another tweak -- I see in the LLVM 17 changelog that they removed constexpr select, so I pushed a commit with that

cdisselkoen commented 8 months ago

CI passes, in my opinion this is good enough to merge, we can address stuff like NSW/NUW in a followup as you say

cdisselkoen commented 8 months ago

NSW/NUW/Exact will be addressed in #56