mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 22:41:07 +00:00
336fc63f1d
Signed-off-by: xermicus <cyrill@parity.io>
21 lines
549 B
Rust
21 lines
549 B
Rust
//! The LLVM function declaration.
|
|
|
|
/// The LLVM function declaration.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct Declaration<'ctx> {
|
|
/// The function type.
|
|
pub r#type: inkwell::types::FunctionType<'ctx>,
|
|
/// The function value.
|
|
pub value: inkwell::values::FunctionValue<'ctx>,
|
|
}
|
|
|
|
impl<'ctx> Declaration<'ctx> {
|
|
/// A shortcut constructor.
|
|
pub fn new(
|
|
r#type: inkwell::types::FunctionType<'ctx>,
|
|
value: inkwell::values::FunctionValue<'ctx>,
|
|
) -> Self {
|
|
Self { r#type, value }
|
|
}
|
|
}
|