Promote more debug-only assertions to regular assertions.
llvm-svn: 355568
This commit is contained in:
parent
9a8e777f8c
commit
1dfba3cfba
|
@ -1685,9 +1685,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() {
|
||||||
if (log)
|
if (log)
|
||||||
log->Printf("Discovered %u ObjC classes in shared cache\n",
|
log->Printf("Discovered %u ObjC classes in shared cache\n",
|
||||||
num_class_infos);
|
num_class_infos);
|
||||||
#ifdef LLDB_CONFIGURATION_DEBUG
|
|
||||||
assert(num_class_infos <= num_classes);
|
assert(num_class_infos <= num_classes);
|
||||||
#endif
|
|
||||||
if (num_class_infos > 0) {
|
if (num_class_infos > 0) {
|
||||||
if (num_class_infos > num_classes) {
|
if (num_class_infos > num_classes) {
|
||||||
num_class_infos = num_classes;
|
num_class_infos = num_classes;
|
||||||
|
|
|
@ -257,10 +257,8 @@ bool GDBRemoteRegisterContext::ReadRegisterBytes(const RegisterInfo *reg_info,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (&data != &m_reg_data) {
|
if (&data != &m_reg_data) {
|
||||||
#if defined(LLDB_CONFIGURATION_DEBUG)
|
|
||||||
assert(m_reg_data.GetByteSize() >=
|
assert(m_reg_data.GetByteSize() >=
|
||||||
reg_info->byte_offset + reg_info->byte_size);
|
reg_info->byte_offset + reg_info->byte_size);
|
||||||
#endif
|
|
||||||
// If our register context and our register info disagree, which should
|
// If our register context and our register info disagree, which should
|
||||||
// never happen, don't read past the end of the buffer.
|
// never happen, don't read past the end of the buffer.
|
||||||
if (m_reg_data.GetByteSize() < reg_info->byte_offset + reg_info->byte_size)
|
if (m_reg_data.GetByteSize() < reg_info->byte_offset + reg_info->byte_size)
|
||||||
|
@ -313,10 +311,8 @@ bool GDBRemoteRegisterContext::WriteRegisterBytes(const RegisterInfo *reg_info,
|
||||||
GDBRemoteCommunicationClient &gdb_comm(
|
GDBRemoteCommunicationClient &gdb_comm(
|
||||||
((ProcessGDBRemote *)process)->GetGDBRemote());
|
((ProcessGDBRemote *)process)->GetGDBRemote());
|
||||||
|
|
||||||
#if defined(LLDB_CONFIGURATION_DEBUG)
|
|
||||||
assert(m_reg_data.GetByteSize() >=
|
assert(m_reg_data.GetByteSize() >=
|
||||||
reg_info->byte_offset + reg_info->byte_size);
|
reg_info->byte_offset + reg_info->byte_size);
|
||||||
#endif
|
|
||||||
|
|
||||||
// If our register context and our register info disagree, which should never
|
// If our register context and our register info disagree, which should never
|
||||||
// happen, don't overwrite past the end of the buffer.
|
// happen, don't overwrite past the end of the buffer.
|
||||||
|
|
Loading…
Reference in New Issue