aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-09-19 16:15:26 +0100
committergingerBill <bill@gingerbill.org>2023-09-19 16:15:26 +0100
commite748d2f2af40895f1b067aaa74ac2ca2b737a243 (patch)
treeea176294a9a2b7845751ef96aab63f28bed61523 /src/llvm_backend_const.cpp
parentecde06e3a31179bd8f86383fd65cfbce31ab6d9a (diff)
Update to LLVM-17
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index fc7d4e2f7..63debc978 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -75,8 +75,8 @@ gb_internal String lb_get_const_string(lbModule *m, lbValue value) {
unsigned ptr_indices[1] = {0};
unsigned len_indices[1] = {1};
- LLVMValueRef underlying_ptr = LLVMConstExtractValue(value.value, ptr_indices, gb_count_of(ptr_indices));
- LLVMValueRef underlying_len = LLVMConstExtractValue(value.value, len_indices, gb_count_of(len_indices));
+ LLVMValueRef underlying_ptr = llvm_const_extract_value(m, value.value, ptr_indices, gb_count_of(ptr_indices));
+ LLVMValueRef underlying_len = llvm_const_extract_value(m, value.value, len_indices, gb_count_of(len_indices));
GB_ASSERT(LLVMGetConstOpcode(underlying_ptr) == LLVMGetElementPtr);
underlying_ptr = LLVMGetOperand(underlying_ptr, 0);
@@ -1096,7 +1096,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bo
if (is_constant) {
LLVMValueRef elem_value = lb_const_value(m, tav.type, tav.value, allow_local).value;
if (LLVMIsConstant(elem_value)) {
- values[index] = LLVMConstInsertValue(values[index], elem_value, idx_list, idx_list_len);
+ values[index] = llvm_const_insert_value(m, values[index], elem_value, idx_list, idx_list_len);
} else {
is_constant = false;
}