mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 14:14:59 -07:00
[source-code-locations] - added options to show, obfuscate, and hide source code locations (#5412)
This commit is contained in:
@@ -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] = {};
|
||||
|
||||
Reference in New Issue
Block a user