[lldb] Replace std::isprint/isspace with llvm's locale-independent version

Summary:
LLVM is using its own isPrint/isSpace implementation that doesn't change depending on the current locale. LLDB should do the same
to prevent that internal logic changes depending on the set locale.

Reviewers: JDevlieghere, labath, mib, totally_not_teemperor

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D82175
This commit is contained in:
Raphael Isemann
2020-06-19 19:17:24 +02:00
parent 8340fbb9c7
commit f5eaa2afe2
11 changed files with 17 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/Utility/StringExtractor.h"
#include "llvm/ADT/StringExtras.h"
#include <tuple>
@@ -365,6 +366,6 @@ bool StringExtractor::GetNameColonValue(llvm::StringRef &name,
void StringExtractor::SkipSpaces() {
const size_t n = m_packet.size();
while (m_index < n && isspace(m_packet[m_index]))
while (m_index < n && llvm::isSpace(m_packet[m_index]))
++m_index;
}