diff options
| author | Harold Brenes <harold@hbrenes.com> | 2025-05-03 13:05:27 -0400 |
|---|---|---|
| committer | Harold Brenes <harold@hbrenes.com> | 2025-05-03 13:06:57 -0400 |
| commit | be2e4dec7d8b7842b8ddcdef6ddbe6d57f603b43 (patch) | |
| tree | bfecff50ba4da8fcad4413aac6c9dc16725080a2 /src/llvm_backend.cpp | |
| parent | fc082f5ea5f8ba65811b0d008e7f86137297849c (diff) | |
Resolve other TODOs
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index ce40e6e9f..10aa45b14 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -1173,7 +1173,6 @@ gb_internal lbProcedure *lb_create_objc_names(lbModule *main_module) { return p; } -// TODO(harold): Perhaps move this out of here and into a more suitable place? String lb_get_objc_type_encoding(Type *t, isize pointer_depth = 0) { // NOTE(harold): See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100 @@ -1424,6 +1423,7 @@ String lb_get_objc_type_encoding(Type *t, isize pointer_depth = 0) { #undef INT_SIZE_ENCODING GB_PANIC("Unreachable"); + return str_lit(""); } struct lbObjCGlobalClass { @@ -1778,7 +1778,10 @@ gb_internal void lb_finalize_objc_names(lbGenerator *gen, lbProcedure *p) { const i64 size = type_size_of(ivar_base); const i64 alignment = (i64)floor_log2((u64)type_align_of(ivar_base)); - // TODO(harold): Should we pass the actual type encoding? Might not be ideal for obfuscation. + // NOTE(harold): I've opted to not emit the type encoding for ivars in order to keep the data private. + // If there is desire in the future to emit the type encoding for introspection through the Obj-C runtime, + // then perhaps an option can be added for it then. + // Should we pass the actual type encoding? Might not be ideal for obfuscation. String ivar_name = str_lit("__$ivar"); String ivar_types = str_lit("{= }"); //lb_get_objc_type_encoding(ivar_type); args.count = 5; |