[Lldb-commits] [lldb] r329682 - Args: replace isprint8 usage with isprint

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 10 03:07:22 PDT 2018

Author: labath
Date: Tue Apr 10 03:07:22 2018
New Revision: 329682

URL: http://llvm.org/viewvc/llvm-project?rev=329682&view=rev
Args: replace isprint8 usage with isprint

It looks like we introduced isprint8 way back in r169417 to be used on
getopt's short_options, which we sometimes set to values which are out
of range for normal chars to indicate options with no short form.

However, this is not how the function is used in the Args class, where
we explicitly process a string character by character.

This removes the last external dependency from the Args class.


Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=329682&r1=329681&r2=329682&view=diff
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Tue Apr 10 03:07:22 2018
@@ -13,7 +13,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/Args.h"
-#include "lldb/Interpreter/Options.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Stream.h"
@@ -620,7 +619,7 @@ void Args::ExpandEscapedCharacters(const
   if (src) {
     for (const char *p = src; *p != '\0'; ++p) {
-      if (isprint8(*p))
+      if (isprint(*p))
         dst.append(1, *p);
       else {
         switch (*p) {

More information about the lldb-commits mailing list