Rename Entity::getName() to Entity::getPrintableName() to make its purpose
more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index ca2e7c8..7a6c05c 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -126,11 +126,11 @@
return 0; // Failed to find a decl using this Entity.
}
-const char *Entity::getName(ASTContext &Ctx) {
+std::string Entity::getPrintableName(ASTContext &Ctx) {
if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(getDecl(Ctx))) {
- return ND->getNameAsCString();
+ return ND->getNameAsString();
}
- return 0;
+ return std::string();
}
/// \brief Get an Entity associated with the given Decl.