PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp
index 2765994..dbf9364 100644
--- a/lib/Frontend/AnalysisConsumer.cpp
+++ b/lib/Frontend/AnalysisConsumer.cpp
@@ -196,7 +196,7 @@
     case Decl::Function: {
       FunctionDecl* FD = cast<FunctionDecl>(D);
 
-      if (Opts.AnalyzeSpecificFunction.size() > 0 &&
+      if (!Opts.AnalyzeSpecificFunction.empty() &&
           Opts.AnalyzeSpecificFunction != FD->getIdentifier()->getName())
         break;
 
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index 2761c6f..339a1c4 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -586,7 +586,7 @@
   typedef data_type data_type_ref;
 
   static unsigned ComputeHash(PTHIdKey* key) {
-    return llvm::HashString(key->II->getNameStr());
+    return llvm::HashString(key->II->getName());
   }
 
   static std::pair<unsigned,unsigned>
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 3883228..f3cb206 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -399,7 +399,7 @@
     }
 
     if (IdentifierInfo *II = Tok.getIdentifierInfo()) {
-      OS << II->getNameStr();
+      OS << II->getName();
     } else if (Tok.isLiteral() && !Tok.needsCleaning() &&
                Tok.getLiteralData()) {
       OS.write(Tok.getLiteralData(), Tok.getLength());
@@ -434,7 +434,7 @@
   struct SortMacrosByID {
     typedef std::pair<IdentifierInfo*, MacroInfo*> id_macro_pair;
     bool operator()(const id_macro_pair &LHS, const id_macro_pair &RHS) const {
-      return LHS.first->getNameStr() < RHS.first->getNameStr();
+      return LHS.first->getName() < RHS.first->getName();
     }
   };
 }
diff --git a/lib/Frontend/RewriteMacros.cpp b/lib/Frontend/RewriteMacros.cpp
index 846d476..b5d59c0 100644
--- a/lib/Frontend/RewriteMacros.cpp
+++ b/lib/Frontend/RewriteMacros.cpp
@@ -128,12 +128,12 @@
       // comment the line out.
       if (RawTokens[CurRawTok].is(tok::identifier)) {
         const IdentifierInfo *II = RawTokens[CurRawTok].getIdentifierInfo();
-        if (II->getNameStr() == "warning") {
+        if (II->getName() == "warning") {
           // Comment out #warning.
           RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//");
-        } else if (II->getNameStr() == "pragma" &&
+        } else if (II->getName() == "pragma" &&
                    RawTokens[CurRawTok+1].is(tok::identifier) &&
-                   (RawTokens[CurRawTok+1].getIdentifierInfo()->getNameStr() ==
+                   (RawTokens[CurRawTok+1].getIdentifierInfo()->getName() ==
                     "mark")) {
           // Comment out #pragma mark.
           RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//");
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index f3ce9cd..0ea0a58 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -2265,7 +2265,7 @@
   if (clsName) { // class message.
     // FIXME: We need to fix Sema (and the AST for ObjCMessageExpr) to handle
     // the 'super' idiom within a class method.
-    if (clsName->getNameStr() == "super") {
+    if (clsName->getName() == "super") {
       MsgSendFlavor = MsgSendSuperFunctionDecl;
       if (MsgSendStretFlavor)
         MsgSendStretFlavor = MsgSendSuperStretFunctionDecl;