Attribute Macro inkwell_internals::llvm_versions

source ·
#[llvm_versions]
Expand description

This macro can be used to specify version constraints for an enum/struct/union or other item which can be decorated with an attribute.

To use with enum variants or struct fields, you need to decorate the parent item with the #[llvm_versioned_item] attribute, as this is the hook we need to modify the AST of those items

Examples

// Inclusive range from 3.6 up to and including 3.9
#[llvm_versions(3.6..=3.9)]

// Exclusive range from 3.6 up to but not including 4.0
#[llvm_versions(3.6..4.0)]

// Inclusive range from 3.6 up to and including the latest release
#[llvm_versions(3.6..=latest)]