diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2025-07-07 14:34:05 -0700 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2025-07-07 14:34:05 -0700 |
| commit | 389439ccb9e60014fa9d7dd26220da8b7b68f763 (patch) | |
| tree | 5f2afed73a1baa177a3edd4de23aaedaa7efaff5 /src/llvm_backend_const.cpp | |
| parent | 04481e0fd289f854e35a84da909184140940bbf7 (diff) | |
| parent | 86d576f7cc1ceeb7472c18e08e3c74214f26ddc6 (diff) | |
Merge branch 'master' into macharena
Diffstat (limited to 'src/llvm_backend_const.cpp')
| -rw-r--r-- | src/llvm_backend_const.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp index e897ae282..c3112934e 100644 --- a/src/llvm_backend_const.cpp +++ b/src/llvm_backend_const.cpp @@ -292,12 +292,26 @@ gb_internal lbValue lb_const_source_code_location_const(lbModule *m, String cons i32 line = pos.line; i32 column = 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"); procedure = obfuscate_string(procedure, "P"); - line = obfuscate_i32(line); - column = obfuscate_i32(column); + line = obfuscate_i32(line); + column = obfuscate_i32(column); + break; + case SourceCodeLocationInfo_Filename: + file = last_path_element(file); + break; + case SourceCodeLocationInfo_None: + file = str_lit(""); + procedure = str_lit(""); + + line = 0; + column = 0; + break; } LLVMValueRef fields[4] = {}; |