]> granicus.if.org Git - clang/commitdiff
[objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent.
authorDavid Chisnall <csdavec@swan.ac.uk>
Tue, 22 May 2018 10:13:11 +0000 (10:13 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Tue, 22 May 2018 10:13:11 +0000 (10:13 +0000)
Patch by Hans Wennborg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332964 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index eb016597cee6fc34a44ffed664ec96e9a72b8a8c..1c1abe90c61ac975425662f6620b1dec2a07fc2a 100644 (file)
@@ -1054,7 +1054,7 @@ class CGObjCGNUstep2 : public CGObjCGNUstep {
       StringName = ".objc_str_";
       for (int i=0,e=Str.size() ; i<e ; ++i) {
         char c = Str[i];
-        if (isalpha(c) || isnumber(c))
+        if (isalnum(c))
           StringName += c;
         else if (c == ' ')
           StringName += '_';