Rename NamedDecl::getName() to getNameAsString().  Replace a bunch of 
uses of getName() with uses of getDeclName().  This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 444ee7c..e862808 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -291,7 +291,7 @@
   // Create DIEnumerator elements for each enumerator.
   for (EnumConstantDecl *Elt = Decl->getEnumConstantList(); Elt;
        Elt = dyn_cast_or_null<EnumConstantDecl>(Elt->getNextDeclarator())) {
-    Enumerators.push_back(DebugFactory.CreateEnumerator(Elt->getName(),
+    Enumerators.push_back(DebugFactory.CreateEnumerator(Elt->getNameAsString(),
                                             Elt->getInitVal().getZExtValue()));
   }
   
@@ -484,7 +484,7 @@
   
   // Create the descriptor for the variable.
   llvm::DIVariable D = 
-    DebugFactory.CreateVariable(Tag, RegionStack.back(), Decl->getName(),
+    DebugFactory.CreateVariable(Tag, RegionStack.back(),Decl->getNameAsString(),
                                 Unit, Line,
                                 getOrCreateType(Decl->getType(), Unit));
   // Insert an llvm.dbg.declare into the current block.