stop calling II::getName() unnecesarily in sema


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59609 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index df42897..7e6c636 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -716,9 +716,8 @@
   // Perform checking for returned stack addresses.
   if (lhsType->isPointerType() || lhsType->isBlockPointerType()) {
     if (DeclRefExpr *DR = EvalAddr(RetValExp))
-      Diag(DR->getLocStart(), diag::warn_ret_stack_addr,
-           DR->getDecl()->getIdentifier()->getName(),
-           RetValExp->getSourceRange());
+      Diag(DR->getLocStart(), diag::warn_ret_stack_addr)
+       << DR->getDecl()->getIdentifier() << RetValExp->getSourceRange();
     
     // Skip over implicit cast expressions when checking for block expressions.
     if (ImplicitCastExpr *IcExpr = 
@@ -734,7 +733,7 @@
     // Check for a reference to the stack
     if (DeclRefExpr *DR = EvalVal(RetValExp))
       Diag(DR->getLocStart(), diag::warn_ret_stack_ref)
-        << DR->getDecl()->getIdentifier()->getName()
+        << DR->getDecl()->getIdentifier()
         << RetValExp->getSourceRange();
   }
 }