[cfe-commits] r42524 - /cfe/trunk/Parse/ParseObjc.cpp

Steve Naroff snaroff at apple.com
Mon Oct 1 19:01:22 PDT 2007


Author: snaroff
Date: Mon Oct  1 21:01:22 2007
New Revision: 42524

URL: http://llvm.org/viewvc/llvm-project?rev=42524&view=rev
Log:

Use Identifier::getLength() instead of strlen() in Selector::getName() and MultiKeywordSelector::getName().


Modified:
    cfe/trunk/Parse/ParseObjc.cpp

Modified: cfe/trunk/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseObjc.cpp?rev=42524&r1=42523&r2=42524&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/Parse/ParseObjc.cpp Mon Oct  1 21:01:22 2007
@@ -529,7 +529,7 @@
   keyword_iterator KeyIter = keyword_begin();
   for (unsigned int i = 0; i < NumArgs; i++) {
     if (KeyIter[i]) {
-      unsigned KeyLen = strlen(KeyIter[i]->getName());
+      unsigned KeyLen = KeyIter[i]->getLength();
       methodName.append(KeyIter[i]->getName(), KeyIter[i]->getName()+KeyLen);
     }
     methodName.push_back(':');
@@ -542,7 +542,7 @@
   methodName[0] = '\0';
   IdentifierInfo *II = getAsIdentifierInfo();
   if (II) {
-    unsigned NameLen = strlen(II->getName());
+    unsigned NameLen = II->getLength();
     methodName.append(II->getName(), II->getName()+NameLen);
     if (getNumArgs() == 1)
       methodName.push_back(':');





More information about the cfe-commits mailing list