aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-19 15:38:21 +0100
committergingerBill <bill@gingerbill.org>2021-08-19 15:38:21 +0100
commitdf372dbd5be1fd219322f0b0b8f141e036fb5203 (patch)
treebe6649d50105d2c9b4d8ef66509e99a33b67efee /src/llvm_backend_const.cpp
parent5c4d95d539944dcb6617ce9c70bcedd12552225a (diff)
Migrate and remove more from gb.h
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index f05202e79..5ad2b09b6 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -400,7 +400,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
} else {
isize max_len = 7+8+1;
char *str = gb_alloc_array(permanent_allocator(), char, max_len);
- u32 id = cast(u32)gb_atomic32_fetch_add(&m->gen->global_array_index, 1);
+ u32 id = m->gen->global_array_index.fetch_add(1);
isize len = gb_snprintf(str, max_len, "csba$%x", id);
String name = make_string(cast(u8 *)str, len-1);