Implement safe API for operand bundles.
Description
Implement a safe API wrapping the operand bundles manipulation calls in llvm-sys. The feature requires llvm18+.
Building call instructions is done with the new Builder::build_direct_call_with_operand_bundles and Builder::build_indirect_call_with_operand_bundles.
Since only call and invoke instructions support operand bundles, introspection methods are implemented on CallSiteValue. CallSiteValue::get_operand_bundles() produces an iterator of OperandBundle values, and OperandBundle::get_args() iterates over a bundle's arguments. OperandBundle::tag() retrieves the bundle's tag as a string slice.
Related Issue
Resolves #523
How This Has Been Tested
Ran tests for LLVM 16 and 18.
Checklist
- [x] I have read the Contributing Guide
There's no CI environment for LLVM18 (was mentioned in https://github.com/TheDan64/inkwell/pull/483#issuecomment-2028912400). Should this be added in a separate PR?
Yes, separate PR please