Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -600,10 +600,9 @@ #if defined(HAVE_LIBCOMPRESSION) // libcompression is weak linked so check that compression_decode_buffer() is // available - if (compression_decode_buffer != NULL && - (m_compression_type == CompressionType::ZlibDeflate || - m_compression_type == CompressionType::LZFSE || - m_compression_type == CompressionType::LZ4)) { + if (m_compression_type == CompressionType::ZlibDeflate || + m_compression_type == CompressionType::LZFSE || + m_compression_type == CompressionType::LZ4) { compression_algorithm compression_type; if (m_compression_type == CompressionType::LZFSE) compression_type = COMPRESSION_LZFSE; Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1022,10 +1022,7 @@ std::string avail_name; #if defined(HAVE_LIBCOMPRESSION) - // libcompression is weak linked so test if compression_decode_buffer() is - // available - if (compression_decode_buffer != NULL && - avail_type == CompressionType::None) { + if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "lzfse") { avail_type = CompressionType::LZFSE; @@ -1037,10 +1034,7 @@ #endif #if defined(HAVE_LIBCOMPRESSION) - // libcompression is weak linked so test if compression_decode_buffer() is - // available - if (compression_decode_buffer != NULL && - avail_type == CompressionType::None) { + if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "zlib-deflate") { avail_type = CompressionType::ZlibDeflate; @@ -1064,10 +1058,7 @@ #endif #if defined(HAVE_LIBCOMPRESSION) - // libcompression is weak linked so test if compression_decode_buffer() is - // available - if (compression_decode_buffer != NULL && - avail_type == CompressionType::None) { + if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "lz4") { avail_type = CompressionType::LZ4; @@ -1079,10 +1070,7 @@ #endif #if defined(HAVE_LIBCOMPRESSION) - // libcompression is weak linked so test if compression_decode_buffer() is - // available - if (compression_decode_buffer != NULL && - avail_type == CompressionType::None) { + if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "lzma") { avail_type = CompressionType::LZMA; Index: lldb/trunk/tools/debugserver/source/MacOSX/OsLogger.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/OsLogger.cpp +++ lldb/trunk/tools/debugserver/source/MacOSX/OsLogger.cpp @@ -56,9 +56,7 @@ } } -DNBCallbackLog OsLogger::GetLogFunction() { - return _os_log_impl ? DarwinLogCallback : nullptr; -} +DNBCallbackLog OsLogger::GetLogFunction() { return DarwinLogCallback; } #else Index: lldb/trunk/tools/debugserver/source/RNBRemote.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/RNBRemote.cpp +++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp @@ -710,26 +710,22 @@ size_t compressed_size = 0; #if defined(HAVE_LIBCOMPRESSION) - if (compression_decode_buffer && - compression_type == compression_types::lz4) { + if (compression_type == compression_types::lz4) { compressed_size = compression_encode_buffer( encoded_data.data(), encoded_data_buf_size, (uint8_t *)orig.c_str(), orig.size(), nullptr, COMPRESSION_LZ4_RAW); } - if (compression_decode_buffer && - compression_type == compression_types::zlib_deflate) { + if (compression_type == compression_types::zlib_deflate) { compressed_size = compression_encode_buffer( encoded_data.data(), encoded_data_buf_size, (uint8_t *)orig.c_str(), orig.size(), nullptr, COMPRESSION_ZLIB); } - if (compression_decode_buffer && - compression_type == compression_types::lzma) { + if (compression_type == compression_types::lzma) { compressed_size = compression_encode_buffer( encoded_data.data(), encoded_data_buf_size, (uint8_t *)orig.c_str(), orig.size(), nullptr, COMPRESSION_LZMA); } - if (compression_decode_buffer && - compression_type == compression_types::lzfse) { + if (compression_type == compression_types::lzfse) { compressed_size = compression_encode_buffer( encoded_data.data(), encoded_data_buf_size, (uint8_t *)orig.c_str(), orig.size(), nullptr, COMPRESSION_LZFSE); @@ -3621,7 +3617,7 @@ #if defined(HAVE_LIBCOMPRESSION) // libcompression is weak linked so test if compression_decode_buffer() is // available - if (enable_compression && compression_decode_buffer != NULL) { + if (enable_compression) { strcat(buf, ";SupportedCompressions=lzfse,zlib-deflate,lz4,lzma;" "DefaultCompressionMinSize="); char numbuf[16]; @@ -4307,24 +4303,22 @@ } #if defined(HAVE_LIBCOMPRESSION) - if (compression_decode_buffer != NULL) { - if (strstr(p, "type:zlib-deflate;") != nullptr) { - EnableCompressionNextSendPacket(compression_types::zlib_deflate); - m_compression_minsize = new_compression_minsize; - return SendPacket("OK"); - } else if (strstr(p, "type:lz4;") != nullptr) { - EnableCompressionNextSendPacket(compression_types::lz4); - m_compression_minsize = new_compression_minsize; - return SendPacket("OK"); - } else if (strstr(p, "type:lzma;") != nullptr) { - EnableCompressionNextSendPacket(compression_types::lzma); - m_compression_minsize = new_compression_minsize; - return SendPacket("OK"); - } else if (strstr(p, "type:lzfse;") != nullptr) { - EnableCompressionNextSendPacket(compression_types::lzfse); - m_compression_minsize = new_compression_minsize; - return SendPacket("OK"); - } + if (strstr(p, "type:zlib-deflate;") != nullptr) { + EnableCompressionNextSendPacket(compression_types::zlib_deflate); + m_compression_minsize = new_compression_minsize; + return SendPacket("OK"); + } else if (strstr(p, "type:lz4;") != nullptr) { + EnableCompressionNextSendPacket(compression_types::lz4); + m_compression_minsize = new_compression_minsize; + return SendPacket("OK"); + } else if (strstr(p, "type:lzma;") != nullptr) { + EnableCompressionNextSendPacket(compression_types::lzma); + m_compression_minsize = new_compression_minsize; + return SendPacket("OK"); + } else if (strstr(p, "type:lzfse;") != nullptr) { + EnableCompressionNextSendPacket(compression_types::lzfse); + m_compression_minsize = new_compression_minsize; + return SendPacket("OK"); } #endif