From fdd52922c2ed7f9ae50009937f9187e1bfb9235e Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Thu, 23 Jul 2009 08:32:25 +0000 Subject: [PATCH] constify methods. llvm-svn: 76873 --- clang/include/clang/Index/Entity.h | 2 +- clang/lib/Index/Entity.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Index/Entity.h b/clang/include/clang/Index/Entity.h index 490a648..cd87e4c 100644 --- a/clang/include/clang/Index/Entity.h +++ b/clang/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/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp index c7924f6..25061e6 100644 --- a/clang/lib/Index/Entity.cpp +++ b/clang/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.7.4