aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codegen.cpp4
-rw-r--r--src/ir.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 547840514a..dc2a4f55df 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -2017,11 +2017,9 @@ static LLVMValueRef ir_llvm_value(CodeGen *g, IrInstruction *instruction) {
render_const_val_global(g, &instruction->value, "");
ZigType *ptr_type = get_pointer_to_type(g, instruction->value.type, true);
instruction->llvm_value = LLVMBuildBitCast(g->builder, instruction->value.global_refs->llvm_global, get_llvm_type(g, ptr_type), "");
- } else if (get_codegen_ptr_type(instruction->value.type) != nullptr) {
+ } else {
instruction->llvm_value = LLVMBuildBitCast(g->builder, instruction->value.global_refs->llvm_value,
get_llvm_type(g, instruction->value.type), "");
- } else {
- instruction->llvm_value = instruction->value.global_refs->llvm_value;
}
assert(instruction->llvm_value);
}
diff --git a/src/ir.cpp b/src/ir.cpp
index 90d79995e1..4d2221ab39 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -14999,7 +14999,7 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe
return parent_result_loc;
}
// because is_comptime is false, we mark this a runtime pointer
- parent_result_loc->value.data.x_ptr.mut = ConstPtrMutRuntimeVar;
+ parent_result_loc->value.special = ConstValSpecialRuntime;
result_loc->written = true;
result_loc->resolved_loc = parent_result_loc;
return result_loc->resolved_loc;