r332964 - [objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent.
David Chisnall via cfe-commits
cfe-commits at lists.llvm.org
Tue May 22 03:13:11 PDT 2018
Author: theraven
Date: Tue May 22 03:13:11 2018
New Revision: 332964
URL: http://llvm.org/viewvc/llvm-project?rev=332964&view=rev
Log:
[objc-gnustep2] Use isalnum instead of a less efficient and nonportable equivalent.
Patch by Hans Wennborg!
Modified:
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=332964&r1=332963&r2=332964&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Tue May 22 03:13:11 2018
@@ -1054,7 +1054,7 @@ class CGObjCGNUstep2 : public CGObjCGNUs
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 += '_';
More information about the cfe-commits
mailing list