diff options
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index df1843af1..13dc87a57 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -801,7 +801,7 @@ bool ir_print_is_proc_global(irModule *m, irProcedure *proc) { return true; } } - return (proc->tags & (ProcTag_foreign|ProcTag_export)) != 0; + return proc->is_foreign || proc->is_export; } void ir_print_value(irFileBuffer *f, irModule *m, irValue *value, Type *type_hint) { @@ -1673,8 +1673,7 @@ void ir_print_proc(irFileBuffer *f, irModule *m, irProcedure *proc) { ir_write_byte(f, '\n'); ir_write_string(f, "define "); if (build_context.is_dll) { - // if (proc->tags & (ProcTag_export|ProcTag_dll_export)) { - if (proc->tags & (ProcTag_export)) { + if (proc->is_export) { ir_write_string(f, "dllexport "); } } @@ -1924,6 +1923,11 @@ void print_llvm_ir(irGen *ir) { if (g->is_foreign) { ir_write_string(f, str_lit("external ")); } + if (build_context.is_dll) { + if (g->is_export) { + ir_write_string(f, str_lit("dllexport ")); + } + } if (g->is_thread_local) { ir_write_string(f, str_lit("thread_local ")); } |