diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2021-03-19 11:07:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-19 11:07:12 +0000 |
| commit | 2b806f7463e7bff9a6818e17ed65b9640a905f50 (patch) | |
| tree | 6e3670e3e6ed17c8e694cccc98cc7c8ca3181e3e /src/ir_print.cpp | |
| parent | 333741222827db990ef2bce11873816e66bc1633 (diff) | |
| parent | 6de0b689288dfebc7c68acbe299526e8310c5bf2 (diff) | |
Merge pull request #875 from atkurtul/master
Run an early memcpy pass regardless of the opt flag and return large structs by pointer on linux
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index d6f46ce4d..d6b387de1 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -339,8 +339,7 @@ void ir_print_proc_type_without_pointer(irFileBuffer *f, irModule *m, Type *t) { // ir_fprintf(f, "* sret noalias "); // ir_write_string(f, str_lit("* noalias ")); ir_write_string(f, str_lit("*")); - if (build_context.ODIN_OS == "darwin" || - build_context.ODIN_OS == "linux") { + if (build_context.ODIN_OS == "darwin") { ir_fprintf(f, " byval"); } if (param_count > 0 || t->Proc.calling_convention == ProcCC_Odin) { @@ -2456,8 +2455,7 @@ void ir_print_proc(irFileBuffer *f, irModule *m, irProcedure *proc) { if (proc_type->return_by_pointer) { ir_print_type(f, m, reduce_tuple_to_single_type(proc_type->results)); ir_write_str_lit(f, "* sret noalias "); - if (build_context.ODIN_OS == "darwin" || - build_context.ODIN_OS == "linux") { + if (build_context.ODIN_OS == "darwin") { ir_fprintf(f, "byval "); } ir_write_str_lit(f, "%agg.result"); |