Index: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp =================================================================== --- lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp +++ lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp @@ -230,15 +230,13 @@ auto types = decl_vendor->FindTypes(ConstString(name), /*max_matches*/ 1); -// The user can forward-declare something that has no definition. The runtime -// doesn't prohibit this at all. This is a rare and very weird case. We keep -// this assert in debug builds so we catch other weird cases. -#ifdef LLDB_CONFIGURATION_DEBUG - assert(!types.empty()); -#else - if (types.empty()) + // The user can forward-declare something that has no definition. The runtime + // doesn't prohibit this at all. This is a rare and very weird case. + if (types.empty()) { + Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES); + LLDB_LOG(log, "Could not find type with name '{0}' in runtime", name); return ast_ctx.getObjCIdType(); -#endif + } return ClangUtil::GetQualType(types.front().GetPointerType()); } else {