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.
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 newBuilder::build_direct_call_with_operand_bundles
andBuilder::build_indirect_call_with_operand_bundles
.Since only
call
andinvoke
instructions support operand bundles, introspection methods are implemented onCallSiteValue
.CallSiteValue::get_operand_bundles()
produces an iterator ofOperandBundle
values, andOperandBundle::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