[Lldb-commits] [PATCH] D76697: [lldb] Replace debug-only assert in AppleObjCTypeEncodingParser::BuildObjCObjectPointerType with lldbassert
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 25 02:08:21 PDT 2020
teemperor updated this revision to Diff 252517.
teemperor retitled this revision from "[lldb] Remove Debug-only assert in AppleObjCTypeEncodingParser::BuildObjCObjectPointerType" to "[lldb] Replace debug-only assert in AppleObjCTypeEncodingParser::BuildObjCObjectPointerType with lldbassert".
teemperor edited the summary of this revision.
teemperor added a comment.
- moved to lldbassert
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76697/new/
https://reviews.llvm.org/D76697
Files:
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
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,12 @@
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
+ // 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.
+ lldbassert(!types.empty());
if (types.empty())
return ast_ctx.getObjCIdType();
-#endif
return ClangUtil::GetQualType(types.front().GetPointerType());
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76697.252517.patch
Type: text/x-patch
Size: 1170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200325/7aa6a31d/attachment.bin>
More information about the lldb-commits
mailing list