Move clients to use IdentifierInfo::getNameStart() instead of getName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index afab2c2..2761c6f 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -591,7 +591,7 @@
 
   static std::pair<unsigned,unsigned>
   EmitKeyDataLength(llvm::raw_ostream& Out, const PTHIdKey* key, uint32_t) {
-    unsigned n = strlen(key->II->getName()) + 1;
+    unsigned n = key->II->getLength() + 1;
     ::Emit16(Out, n);
     return std::make_pair(n, sizeof(uint32_t));
   }
@@ -600,7 +600,7 @@
     // Record the location of the key data.  This is used when generating
     // the mapping from persistent IDs to strings.
     key->FileOffset = Out.tell();
-    Out.write(key->II->getName(), n);
+    Out.write(key->II->getNameStart(), n);
   }
 
   static void EmitData(llvm::raw_ostream& Out, PTHIdKey*, uint32_t pID,
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index bd5bbbe..ef73da7 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1505,7 +1505,7 @@
       IdentifierInfo *II = Identifiers[I];
       // Look in the on-disk hash table for an entry for
       PCHIdentifierLookupTrait Info(*this, II);
-      std::pair<const char*, unsigned> Key(II->getName(), II->getLength());
+      std::pair<const char*, unsigned> Key(II->getNameStart(), II->getLength());
       PCHIdentifierLookupTable::iterator Pos = IdTable->find(Key, &Info);
       if (Pos == IdTable->end())
         continue;
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index 602f9c9..dbe1e99 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -1594,7 +1594,7 @@
   std::pair<unsigned,unsigned>
     EmitKeyDataLength(llvm::raw_ostream& Out, const IdentifierInfo* II,
                       pch::IdentID ID) {
-    unsigned KeyLen = strlen(II->getName()) + 1;
+    unsigned KeyLen = II->getLength() + 1;
     unsigned DataLen = 4; // 4 bytes for the persistent ID << 1
     if (isInterestingIdentifier(II)) {
       DataLen += 2; // 2 bytes for builtin ID, flags
@@ -1619,7 +1619,7 @@
     // Record the location of the key data.  This is used when generating
     // the mapping from persistent IDs to strings.
     Writer.SetIdentifierOffset(II, Out.tell());
-    Out.write(II->getName(), KeyLen);
+    Out.write(II->getNameStart(), KeyLen);
   }
 
   void EmitData(llvm::raw_ostream& Out, const IdentifierInfo* II,
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index 55ab78e..bd3031a 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -2289,9 +2289,9 @@
       llvm::SmallVector<Expr*, 8> ClsExprs;
       QualType argType = Context->getPointerType(Context->CharTy);
       ClsExprs.push_back(StringLiteral::Create(*Context,
-                                        SuperDecl->getIdentifier()->getName(),
-                                        SuperDecl->getIdentifier()->getLength(),
-                                        false, argType, SourceLocation()));
+                                     SuperDecl->getIdentifier()->getNameStart(),
+                                     SuperDecl->getIdentifier()->getLength(),
+                                     false, argType, SourceLocation()));
       CallExpr *Cls = SynthesizeCallToFunctionDecl(GetMetaClassFunctionDecl,
                                                    &ClsExprs[0],
                                                    ClsExprs.size());
@@ -2343,7 +2343,7 @@
       llvm::SmallVector<Expr*, 8> ClsExprs;
       QualType argType = Context->getPointerType(Context->CharTy);
       ClsExprs.push_back(StringLiteral::Create(*Context,
-                                               clsName->getName(),
+                                               clsName->getNameStart(),
                                                clsName->getLength(),
                                                false, argType,
                                                SourceLocation()));
@@ -2375,9 +2375,9 @@
       llvm::SmallVector<Expr*, 8> ClsExprs;
       QualType argType = Context->getPointerType(Context->CharTy);
       ClsExprs.push_back(StringLiteral::Create(*Context,
-                                        SuperDecl->getIdentifier()->getName(),
-                                        SuperDecl->getIdentifier()->getLength(),
-                                        false, argType, SourceLocation()));
+                                     SuperDecl->getIdentifier()->getNameStart(),
+                                     SuperDecl->getIdentifier()->getLength(),
+                                     false, argType, SourceLocation()));
       CallExpr *Cls = SynthesizeCallToFunctionDecl(GetClassFunctionDecl,
                                                    &ClsExprs[0],
                                                    ClsExprs.size());