From f7856437cfcf49523d81ebe1fc2351e3284dedfa Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Thu, 23 Jul 2009 08:32:25 +0000 Subject: [PATCH] constify methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Index/Entity.h | 2 +- lib/Index/Entity.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clang/Index/Entity.h b/include/clang/Index/Entity.h index 490a648926..cd87e4ccc1 100644 --- a/include/clang/Index/Entity.h +++ b/include/clang/Index/Entity.h @@ -58,7 +58,7 @@ public: Decl *getDecl(ASTContext &AST); /// \brief Get a printable name for debugging purpose. - std::string getPrintableName(); + std::string getPrintableName() const; /// \brief Get an Entity associated with the given Decl. /// \returns Null if an Entity cannot refer to this Decl. diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp index c7924f65fc..25061e6150 100644 --- a/lib/Index/Entity.cpp +++ b/lib/Index/Entity.cpp @@ -156,7 +156,7 @@ Decl *Entity::getDecl(ASTContext &AST) { return Val.get()->getDecl(AST); } -std::string Entity::getPrintableName() { +std::string Entity::getPrintableName() const { if (isInvalid()) return "<< Invalid >>"; -- 2.40.0