No longer use lvalue for function call expression
This commit is contained in:
parent
5abcd6e00a
commit
174d397b89
@ -83,8 +83,7 @@ namespace AST {
|
|||||||
for (auto& arg : this->m_args) {
|
for (auto& arg : this->m_args) {
|
||||||
args.push_back(arg->codegen(builder, scope).value);
|
args.push_back(arg->codegen(builder, scope).value);
|
||||||
}
|
}
|
||||||
auto with_lvalue = scope.with_lvalue();
|
auto function = this->m_fn_expr->codegen(builder, scope);
|
||||||
auto function = this->m_fn_expr->codegen(builder, with_lvalue);
|
|
||||||
|
|
||||||
auto value = builder.builder->CreateCall(llvm::dyn_cast<llvm::FunctionType>(function.ty->codegen(builder)), function.value, args, "call");
|
auto value = builder.builder->CreateCall(llvm::dyn_cast<llvm::FunctionType>(function.ty->codegen(builder)), function.value, args, "call");
|
||||||
return codegen::StackValue{
|
return codegen::StackValue{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user