aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-07-17 07:49:44 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-07-17 07:49:44 +0000
commit56aac3f6c2d23c68f527c8225c74d833e534a262 (patch)
treeec4a6d5f8b3872cce54ad1cdc0a1436bb61f6bce /lib/Index/Entity.cpp
parent7f66bd28b5e9016f2f6f4ddc52e083352f90ed11 (diff)
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
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r--lib/Index/Entity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index ca2e7c8f3e..7a6c05c416 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -126,11 +126,11 @@ Decl *Entity::getDecl(ASTContext &AST) {
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.