Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier.  Update callers to do the right
thing and avoid this method in unsafe cases.  This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index b56b050..534adfe 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -121,7 +121,8 @@
   if (CGDebugInfo *DI = CGM.getDebugInfo()) {
     DI->setLocation(StartLoc);
     if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
-      DI->EmitFunctionStart(FD->getIdentifierName(), RetTy, CurFn, Builder);
+      DI->EmitFunctionStart(FD->getIdentifier()->getName(),
+                            RetTy, CurFn, Builder);
     } else {
       // Just use LLVM function name.
       DI->EmitFunctionStart(Fn->getName().c_str(),