diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-07-23 08:32:25 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-07-23 08:32:25 +0000 |
commit | f7856437cfcf49523d81ebe1fc2351e3284dedfa (patch) | |
tree | f836529284a27d297cca7249754b786604d3acbb | |
parent | b85bca2676b433ae555db09de4dd2823ff13b856 (diff) |
constify methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Index/Entity.h | 2 | ||||
-rw-r--r-- | 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<EntityImpl *>()->getDecl(AST); } -std::string Entity::getPrintableName() { +std::string Entity::getPrintableName() const { if (isInvalid()) return "<< Invalid >>"; |