aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_general.cpp
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2025-07-07 14:34:05 -0700
committerColin Davidson <colrdavidson@gmail.com>2025-07-07 14:34:05 -0700
commit389439ccb9e60014fa9d7dd26220da8b7b68f763 (patch)
tree5f2afed73a1baa177a3edd4de23aaedaa7efaff5 /src/llvm_backend_general.cpp
parent04481e0fd289f854e35a84da909184140940bbf7 (diff)
parent86d576f7cc1ceeb7472c18e08e3c74214f26ddc6 (diff)
Merge branch 'master' into macharena
Diffstat (limited to 'src/llvm_backend_general.cpp')
-rw-r--r--src/llvm_backend_general.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 5aaa7f63a..aaa9ffd4d 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -568,10 +568,22 @@ gb_internal void lb_set_file_line_col(lbProcedure *p, Array<lbValue> arr, TokenP
i32 line = pos.line;
i32 col = pos.column;
- if (build_context.obfuscate_source_code_locations) {
+ switch (build_context.source_code_location_info) {
+ case SourceCodeLocationInfo_Normal:
+ break;
+ case SourceCodeLocationInfo_Obfuscated:
file = obfuscate_string(file, "F");
line = obfuscate_i32(line);
col = obfuscate_i32(col);
+ break;
+ case SourceCodeLocationInfo_Filename:
+ file = last_path_element(file);
+ break;
+ case SourceCodeLocationInfo_None:
+ file = str_lit("");
+ line = 0;
+ col = 0;
+ break;
}
arr[0] = lb_find_or_add_entity_string(p->module, file, false);
@@ -2206,7 +2218,7 @@ gb_internal LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
field_count = 3;
}
LLVMTypeRef *fields = gb_alloc_array(permanent_allocator(), LLVMTypeRef, field_count);
- fields[0] = LLVMPointerType(lb_type(m, type->Pointer.elem), 0);
+ fields[0] = LLVMPointerType(lb_type(m, type->SoaPointer.elem), 0);
if (bigger_int) {
fields[1] = lb_type_padding_filler(m, build_context.ptr_size, build_context.ptr_size);
fields[2] = LLVMIntTypeInContext(ctx, 8*cast(unsigned)build_context.int_size);