CallFunction -> FnCall

This commit is contained in:
lyken 2024-08-28 12:55:19 +08:00
parent 1e65f16f1e
commit c1281db0cd
No known key found for this signature in database
GPG Key ID: 3BD5FC6AC8325DD8
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ struct Arg<'ctx> {
/// If `my_function_name` has not been declared in `ctx.module`, once `.returning()` is called, a function /// If `my_function_name` has not been declared in `ctx.module`, once `.returning()` is called, a function
/// declaration of `my_function_name` is added to `ctx.module`, where the [`FunctionType`] is deduced from /// declaration of `my_function_name` is added to `ctx.module`, where the [`FunctionType`] is deduced from
/// the argument types and returning type. /// the argument types and returning type.
pub struct CallFunction<'ctx, 'a, 'b, 'c, 'd, G: CodeGenerator + ?Sized> { pub struct FnCall<'ctx, 'a, 'b, 'c, 'd, G: CodeGenerator + ?Sized> {
generator: &'d mut G, generator: &'d mut G,
ctx: &'b CodeGenContext<'ctx, 'a>, ctx: &'b CodeGenContext<'ctx, 'a>,
/// Function name /// Function name
@ -46,9 +46,9 @@ pub struct CallFunction<'ctx, 'a, 'b, 'c, 'd, G: CodeGenerator + ?Sized> {
attrs: Vec<&'static str>, attrs: Vec<&'static str>,
} }
impl<'ctx, 'a, 'b, 'c, 'd, G: CodeGenerator + ?Sized> CallFunction<'ctx, 'a, 'b, 'c, 'd, G> { impl<'ctx, 'a, 'b, 'c, 'd, G: CodeGenerator + ?Sized> FnCall<'ctx, 'a, 'b, 'c, 'd, G> {
pub fn begin(generator: &'d mut G, ctx: &'b CodeGenContext<'ctx, 'a>, name: &'c str) -> Self { pub fn begin(generator: &'d mut G, ctx: &'b CodeGenContext<'ctx, 'a>, name: &'c str) -> Self {
CallFunction { generator, ctx, name, args: Vec::new(), attrs: Vec::new() } FnCall { generator, ctx, name, args: Vec::new(), attrs: Vec::new() }
} }
/// Push a list of LLVM function attributes to the function declaration. /// Push a list of LLVM function attributes to the function declaration.