No longer use lvalue for function call expression

This commit is contained in:
Sofia 2026-04-10 19:56:46 +03:00
parent 5abcd6e00a
commit 174d397b89

View File

@ -83,8 +83,7 @@ namespace AST {
for (auto& arg : this->m_args) {
args.push_back(arg->codegen(builder, scope).value);
}
auto with_lvalue = scope.with_lvalue();
auto function = this->m_fn_expr->codegen(builder, with_lvalue);
auto function = this->m_fn_expr->codegen(builder, scope);
auto value = builder.builder->CreateCall(llvm::dyn_cast<llvm::FunctionType>(function.ty->codegen(builder)), function.value, args, "call");
return codegen::StackValue{