| ... | ... | @@ -5220,13 +5220,13 @@ static bool is_llvm_value_unnamed_type(TypeTableEntry *type_entry, LLVMValueRef |
| 5220 | 5220 | } |
| 5221 | 5221 | |
| 5222 | 5222 | static LLVMValueRef gen_const_val_ptr(CodeGen *g, ConstExprValue *const_val, const char *name) { |
| 5223 | | render_const_val_global(g, const_val, name); |
| 5224 | 5223 | switch (const_val->data.x_ptr.special) { |
| 5225 | 5224 | case ConstPtrSpecialInvalid: |
| 5226 | 5225 | case ConstPtrSpecialDiscard: |
| 5227 | 5226 | zig_unreachable(); |
| 5228 | 5227 | case ConstPtrSpecialRef: |
| 5229 | 5228 | { |
| 5229 | render_const_val_global(g, const_val, name); |
| 5230 | 5230 | ConstExprValue *pointee = const_val->data.x_ptr.data.ref.pointee; |
| 5231 | 5231 | render_const_val(g, pointee, ""); |
| 5232 | 5232 | render_const_val_global(g, pointee, ""); |
| ... | ... | @@ -5237,6 +5237,7 @@ static LLVMValueRef gen_const_val_ptr(CodeGen *g, ConstExprValue *const_val, con |
| 5237 | 5237 | } |
| 5238 | 5238 | case ConstPtrSpecialBaseArray: |
| 5239 | 5239 | { |
| 5240 | render_const_val_global(g, const_val, name); |
| 5240 | 5241 | ConstExprValue *array_const_val = const_val->data.x_ptr.data.base_array.array_val; |
| 5241 | 5242 | size_t elem_index = const_val->data.x_ptr.data.base_array.elem_index; |
| 5242 | 5243 | assert(array_const_val->type->id == TypeTableEntryIdArray); |
| ... | ... | @@ -5257,6 +5258,7 @@ static LLVMValueRef gen_const_val_ptr(CodeGen *g, ConstExprValue *const_val, con |
| 5257 | 5258 | } |
| 5258 | 5259 | case ConstPtrSpecialBaseStruct: |
| 5259 | 5260 | { |
| 5261 | render_const_val_global(g, const_val, name); |
| 5260 | 5262 | ConstExprValue *struct_const_val = const_val->data.x_ptr.data.base_struct.struct_val; |
| 5261 | 5263 | assert(struct_const_val->type->id == TypeTableEntryIdStruct); |
| 5262 | 5264 | if (struct_const_val->type->zero_bits) { |
| ... | ... | @@ -5279,6 +5281,7 @@ static LLVMValueRef gen_const_val_ptr(CodeGen *g, ConstExprValue *const_val, con |
| 5279 | 5281 | } |
| 5280 | 5282 | case ConstPtrSpecialHardCodedAddr: |
| 5281 | 5283 | { |
| 5284 | render_const_val_global(g, const_val, name); |
| 5282 | 5285 | uint64_t addr_value = const_val->data.x_ptr.data.hard_coded_addr.addr; |
| 5283 | 5286 | TypeTableEntry *usize = g->builtin_types.entry_usize; |
| 5284 | 5287 | const_val->global_refs->llvm_value = LLVMConstIntToPtr(LLVMConstInt(usize->type_ref, addr_value, false), |