[Lldb-commits] [lldb] r355568 - Promote more debug-only assertions to regular assertions.

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 6 16:10:11 PST 2019


Author: adrian
Date: Wed Mar  6 16:10:11 2019
New Revision: 355568

URL: http://llvm.org/viewvc/llvm-project?rev=355568&view=rev
Log:
Promote more debug-only assertions to regular assertions.

Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=355568&r1=355567&r2=355568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Wed Mar  6 16:10:11 2019
@@ -1685,9 +1685,7 @@ AppleObjCRuntimeV2::UpdateISAToDescripto
       if (log)
         log->Printf("Discovered %u ObjC classes in shared cache\n",
                     num_class_infos);
-#ifdef LLDB_CONFIGURATION_DEBUG
       assert(num_class_infos <= num_classes);
-#endif
       if (num_class_infos > 0) {
         if (num_class_infos > num_classes) {
           num_class_infos = num_classes;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=355568&r1=355567&r2=355568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Wed Mar  6 16:10:11 2019
@@ -257,10 +257,8 @@ bool GDBRemoteRegisterContext::ReadRegis
   }
 
   if (&data != &m_reg_data) {
-#if defined(LLDB_CONFIGURATION_DEBUG)
     assert(m_reg_data.GetByteSize() >=
            reg_info->byte_offset + reg_info->byte_size);
-#endif
     // If our register context and our register info disagree, which should
     // never happen, don't read past the end of the buffer.
     if (m_reg_data.GetByteSize() < reg_info->byte_offset + reg_info->byte_size)
@@ -313,10 +311,8 @@ bool GDBRemoteRegisterContext::WriteRegi
   GDBRemoteCommunicationClient &gdb_comm(
       ((ProcessGDBRemote *)process)->GetGDBRemote());
 
-#if defined(LLDB_CONFIGURATION_DEBUG)
   assert(m_reg_data.GetByteSize() >=
          reg_info->byte_offset + reg_info->byte_size);
-#endif
 
   // If our register context and our register info disagree, which should never
   // happen, don't overwrite past the end of the buffer.




More information about the lldb-commits mailing list