diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2020-06-19 19:17:24 +0200 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2020-06-19 19:17:56 +0200 |
| commit | f5eaa2afe2a9faa2d05ca46e006e770d17c32778 (patch) | |
| tree | 315db107d4cd813a2a0c531997d93b2807bc0c89 /lldb/source/Core/DumpDataExtractor.cpp | |
| parent | 8340fbb9c7bc9ea5f3b636ec3c449ff87d88fd9d (diff) | |
[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
Diffstat (limited to 'lldb/source/Core/DumpDataExtractor.cpp')
| -rw-r--r-- | lldb/source/Core/DumpDataExtractor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index f715e9a16891..233a1b373550 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -284,7 +284,7 @@ lldb::offset_t lldb_private::DumpDataExtractor( 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 @@ lldb::offset_t lldb_private::DumpDataExtractor( 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 @@ lldb::offset_t lldb_private::DumpDataExtractor( s->PutChar('\"'); while (const char c = *cstr) { - if (isprint(c)) { + if (llvm::isPrint(c)) { s->PutChar(c); } else { switch (c) { |
