Index: lldb/include/lldb/Interpreter/Options.h =================================================================== --- lldb/include/lldb/Interpreter/Options.h +++ lldb/include/lldb/Interpreter/Options.h @@ -43,7 +43,7 @@ static inline bool isprint8(int ch) { if (ch & 0xffffff00u) return false; - return isprint(ch); + return llvm::isPrint(ch); } /// \class Options Options.h "lldb/Interpreter/Options.h" Index: lldb/source/Core/DumpDataExtractor.cpp =================================================================== --- lldb/source/Core/DumpDataExtractor.cpp +++ lldb/source/Core/DumpDataExtractor.cpp @@ -284,7 +284,7 @@ const uint64_t ch = DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset); - if (isprint(ch)) + if (llvm::isPrint(ch)) s->Printf("%c", (char)ch); else if (item_format != eFormatCharPrintable) { switch (ch) { @@ -375,7 +375,7 @@ s->PutChar('\''); for (uint32_t i = 0; i < item_byte_size; ++i) { uint8_t ch = (uint8_t)(uval64 >> ((item_byte_size - i - 1) * 8)); - if (isprint(ch)) + if (llvm::isPrint(ch)) s->Printf("%c", ch); else { switch (ch) { @@ -425,7 +425,7 @@ s->PutChar('\"'); while (const char c = *cstr) { - if (isprint(c)) { + if (llvm::isPrint(c)) { s->PutChar(c); } else { switch (c) { Index: lldb/source/Core/IOHandlerCursesGUI.cpp =================================================================== --- lldb/source/Core/IOHandlerCursesGUI.cpp +++ lldb/source/Core/IOHandlerCursesGUI.cpp @@ -919,7 +919,7 @@ const attr_t hilgight_attr = A_REVERSE; if (highlight) window.AttributeOn(hilgight_attr); - if (isprint(shortcut_key)) { + if (llvm::isPrint(shortcut_key)) { size_t lower_pos = m_name.find(tolower(shortcut_key)); size_t upper_pos = m_name.find(toupper(shortcut_key)); const char *name = m_name.c_str(); @@ -948,7 +948,7 @@ window.AttributeOff(hilgight_attr); if (m_key_name.empty()) { - if (!underlined_shortcut && isprint(m_key_value)) { + if (!underlined_shortcut && llvm::isPrint(m_key_value)) { window.AttributeOn(COLOR_PAIR(3)); window.Printf(" (%c)", m_key_value); window.AttributeOff(COLOR_PAIR(3)); @@ -2715,7 +2715,7 @@ case KEY_ESCAPE: return "escape"; default: - if (isprint(ch)) + if (llvm::isPrint(ch)) snprintf(g_desc, sizeof(g_desc), "%c", ch); else snprintf(g_desc, sizeof(g_desc), "\\x%2.2x", ch); Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -763,7 +763,7 @@ if (m_bytes[0] == '$' && total_length > 4) { for (size_t i = 0; !binary && i < total_length; ++i) { unsigned char c = m_bytes[i]; - if (isprint(c) == 0 && isspace(c) == 0) { + if (!llvm::isPrint(c) && isspace(c) == 0) { binary = true; } } Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -841,7 +841,7 @@ bool send_hex_encoding = false; for (const char *p = name_equal_value; *p != '\0' && !send_hex_encoding; ++p) { - if (isprint(*p)) { + if (llvm::isPrint(*p)) { switch (*p) { case '$': case '#': Index: lldb/source/Utility/Args.cpp =================================================================== --- lldb/source/Utility/Args.cpp +++ lldb/source/Utility/Args.cpp @@ -546,7 +546,7 @@ dst.clear(); if (src) { for (const char *p = src; *p != '\0'; ++p) { - if (isprint(*p)) + if (llvm::isPrint(*p)) dst.append(1, *p); else { switch (*p) { Index: lldb/source/Utility/DataExtractor.cpp =================================================================== --- lldb/source/Utility/DataExtractor.cpp +++ lldb/source/Utility/DataExtractor.cpp @@ -964,7 +964,7 @@ break; case TypeChar: { char ch = GetU8(&offset); - sstr.Printf(" %c", isprint(ch) ? ch : ' '); + sstr.Printf(" %c", llvm::isPrint(ch) ? ch : ' '); } break; case TypeUInt16: sstr.Printf(" %4.4x", GetU16(&offset)); Index: lldb/source/Utility/Event.cpp =================================================================== --- lldb/source/Utility/Event.cpp +++ lldb/source/Utility/Event.cpp @@ -125,7 +125,7 @@ void EventDataBytes::Dump(Stream *s) const { size_t num_printable_chars = - std::count_if(m_bytes.begin(), m_bytes.end(), isprint); + std::count_if(m_bytes.begin(), m_bytes.end(), llvm::isPrint); if (num_printable_chars == m_bytes.size()) s->Format("\"{0}\"", m_bytes); else