aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
diff options
context:
space:
mode:
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.