From 8727db41f726e9511b04a19bcb00f5b06cbc7e4f Mon Sep 17 00:00:00 2001 From: Jagi Natarajan Date: Thu, 9 Jul 2026 14:24:40 -0400 Subject: [PATCH] Fix regression, fetch obj-c superclass name instead of class name --- src/llvm_backend.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index e648d5e47..4bdde8305 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -1571,7 +1571,10 @@ gb_internal void lb_finalize_objc_names(lbGenerator *gen, lbProcedure *p) { for (Entity *e = {}; mpsc_dequeue(&gen->info->objc_class_implementations, &e); /**/) { GB_ASSERT(e->kind == Entity_TypeName && e->TypeName.objc_is_implementation); lb_handle_objc_find_or_register_class(p, e->TypeName.objc_class_name, e->type); - error(e->token, "Objective-C related things are not allowed with '-bedrock'"); + + if (build_context.bedrock) { + error(e->token, "Objective-C related things are not allowed with '-bedrock'"); + } } // Ensure classes that have been implicitly referenced through @@ -1684,7 +1687,7 @@ gb_internal void lb_finalize_objc_names(lbGenerator *gen, lbProcedure *p) { Type *superclass = tn.objc_superclass; if (superclass != nullptr) { - auto& superclass_global = string_map_must_get(&global_class_map, tn.objc_class_name); + auto &superclass_global = string_map_must_get(&global_class_map, superclass->Named.type_name->TypeName.objc_class_name); superclass_value = superclass_global.class_value; }