Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104171 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index d1840f5..663737a 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -648,7 +648,6 @@
  */
 enum CXCursorKind {
   /* Declarations */
-  CXCursor_FirstDecl                     = 1,
   /**
    * \brief A declaration whose specific kind is not exposed via this
    * interface.
@@ -707,6 +706,7 @@
   /** \brief A linkage specification, e.g. 'extern "C"'. */
   CXCursor_LinkageSpec                   = 23,
 
+  CXCursor_FirstDecl                     = CXCursor_UnexposedDecl,
   CXCursor_LastDecl                      = CXCursor_LinkageSpec,
 
   /* References */
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 5056336..945d05b 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -1585,10 +1585,11 @@
     // ObjCCategoryImplDecl returns the category name.
     return createCXString(CIMP->getIdentifier()->getNameStart());
 
-  if (ND->getIdentifier())
-    return createCXString(ND->getIdentifier()->getNameStart());
-
-  return createCXString("");
+  llvm::SmallString<1024> S;
+  llvm::raw_svector_ostream os(S);
+  ND->printName(os);
+  
+  return createCXString(os.str());
 }
 
 CXString clang_getCursorSpelling(CXCursor C) {