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/Interpreter/CommandInterpreter.cpp | |
parent | 8340fbb9c7bc9ea5f3b636ec3c449ff87d88fd9d (diff) | |
download | llvm-f5eaa2afe2a9faa2d05ca46e006e770d17c32778.zip llvm-f5eaa2afe2a9faa2d05ca46e006e770d17c32778.tar.gz llvm-f5eaa2afe2a9faa2d05ca46e006e770d17c32778.tar.bz2 |
[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/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 2eedfc2..e55b255 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1340,10 +1340,10 @@ static size_t FindArgumentTerminator(const std::string &s) { if (pos == std::string::npos) break; if (pos > 0) { - if (isspace(s[pos - 1])) { + if (llvm::isSpace(s[pos - 1])) { // Check if the string ends "\s--" (where \s is a space character) or // if we have "\s--\s". - if ((pos + 2 >= s_len) || isspace(s[pos + 2])) { + if ((pos + 2 >= s_len) || llvm::isSpace(s[pos + 2])) { return pos; } } |