#![doc(html_root_url = "https://docs.rs/llvm-ir/0.8.2")]
#[macro_use]
mod from_llvm;
mod iterators;
#[rustfmt::skip]
mod llvm_sys;
pub mod basicblock;
pub use basicblock::BasicBlock;
pub mod constant;
pub use constant::{Constant, ConstantRef};
#[cfg(feature = "llvm-9-or-greater")]
pub mod debugloc;
#[cfg(feature = "llvm-9-or-greater")]
pub use debugloc::{DebugLoc, HasDebugLoc};
pub mod function;
pub use function::Function;
pub mod instruction;
pub use instruction::Instruction;
pub mod module;
pub use module::Module;
pub mod name;
pub use name::Name;
pub mod operand;
pub use operand::Operand;
pub mod predicates;
pub use predicates::{FPPredicate, IntPredicate};
pub mod terminator;
pub use terminator::Terminator;
pub mod types;
pub use types::{Type, TypeRef};
macro_rules! case {
($feature:expr) => {
if cfg!(feature = $feature) {
return $feature.strip_prefix("llvm-").unwrap();
}
};
}
pub fn llvm_version() -> &'static str {
case!("llvm-8");
case!("llvm-9");
case!("llvm-10");
case!("llvm-11");
case!("llvm-12");
case!("llvm-13");
case!("llvm-14");
case!("llvm-15");
unreachable!()
}