diff options
| author | gingerBill <bill@gingerbill.org> | 2017-11-03 23:46:42 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-11-03 23:46:42 +0000 |
| commit | 121f0185d6923c84d64ee75326d15013eb5d1fe0 (patch) | |
| tree | efdd5144c55a761d2f9a81f5d04f4fed264661d6 /src/ir_print.cpp | |
| parent | e7999f8450aca9c4c81e272470be438e6a183939 (diff) | |
Custom thread local models
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 637486912..27704133f 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1934,8 +1934,14 @@ void print_llvm_ir(irGen *ir) { ir_write_string(f, str_lit("dllexport ")); } } - if (g->is_thread_local) { - ir_write_string(f, str_lit("thread_local ")); + if (g->thread_local_model.len > 0) { + String model = g->thread_local_model; + if (model == "default") { + ir_write_string(f, str_lit("thread_local ")); + } else { + ir_fprintf(f, "thread_local(%.*s) ", LIT(model)); + + } } if (g->is_private) { |