mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-26 09:23:48 +00:00
Add missing cast to global/static var alignments.
This commit is contained in:
@@ -1984,7 +1984,7 @@ gb_internal void lb_build_static_variables(lbProcedure *p, AstValueDecl *vd) {
|
||||
char *c_name = alloc_cstring(permanent_allocator(), mangled_name);
|
||||
|
||||
LLVMValueRef global = LLVMAddGlobal(p->module->mod, lb_type(p->module, e->type), c_name);
|
||||
LLVMSetAlignment(global, type_align_of(e->type));
|
||||
LLVMSetAlignment(global, cast(u32)type_align_of(e->type));
|
||||
LLVMSetInitializer(global, LLVMConstNull(lb_type(p->module, e->type)));
|
||||
if (value.value != nullptr) {
|
||||
LLVMSetInitializer(global, value.value);
|
||||
|
||||
Reference in New Issue
Block a user