Remove libc dependency for the generated code
This commit is contained in:
@@ -44,7 +44,7 @@ namespace elna::source
|
||||
void name_analysis_visitor::visit(program *program)
|
||||
{
|
||||
class procedure_type main_type{ std::vector<std::shared_ptr<const class type>>(), this->pointer_size };
|
||||
this->table->enter("main", std::make_shared<procedure_info>(main_type, this->table));
|
||||
this->table->enter("_start", std::make_shared<procedure_info>(main_type, this->table));
|
||||
empty_visitor::visit(program);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace elna::source
|
||||
this->argument_offset = 0;
|
||||
|
||||
empty_visitor::visit(program);
|
||||
std::dynamic_pointer_cast<procedure_info>(table->lookup("main"))->local_stack_size =
|
||||
std::dynamic_pointer_cast<procedure_info>(table->lookup("_start"))->local_stack_size =
|
||||
std::abs(this->local_offset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user