New @export() handling
Use a struct as second parameter to be future proof (and also allows to specify default values for the parameters) Closes #2679 as it was just a matter of a few lines of code.
This commit is contained in:
@@ -1893,21 +1893,11 @@ static void ir_print_enum_tag_type(IrPrint *irp, IrInstructionTagType *instructi
|
||||
}
|
||||
|
||||
static void ir_print_export(IrPrint *irp, IrInstructionExport *instruction) {
|
||||
if (instruction->linkage == nullptr) {
|
||||
fprintf(irp->f, "@export(");
|
||||
ir_print_other_instruction(irp, instruction->name);
|
||||
fprintf(irp->f, ",");
|
||||
ir_print_other_instruction(irp, instruction->target);
|
||||
fprintf(irp->f, ")");
|
||||
} else {
|
||||
fprintf(irp->f, "@exportWithLinkage(");
|
||||
ir_print_other_instruction(irp, instruction->name);
|
||||
fprintf(irp->f, ",");
|
||||
ir_print_other_instruction(irp, instruction->target);
|
||||
fprintf(irp->f, ",");
|
||||
ir_print_other_instruction(irp, instruction->linkage);
|
||||
fprintf(irp->f, ")");
|
||||
}
|
||||
fprintf(irp->f, "@export(");
|
||||
ir_print_other_instruction(irp, instruction->target);
|
||||
fprintf(irp->f, ",");
|
||||
ir_print_other_instruction(irp, instruction->options);
|
||||
fprintf(irp->f, ")");
|
||||
}
|
||||
|
||||
static void ir_print_error_return_trace(IrPrint *irp, IrInstructionErrorReturnTrace *instruction) {
|
||||
|
||||
Reference in New Issue
Block a user