constify methods.
authorZhongxing Xu <xuzhongxing@gmail.com>
Thu, 23 Jul 2009 08:32:25 +0000 (08:32 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Thu, 23 Jul 2009 08:32:25 +0000 (08:32 +0000)
llvm-svn: 76873

clang/include/clang/Index/Entity.h
clang/lib/Index/Entity.cpp

index 490a648..cd87e4c 100644 (file)
@@ -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.
index c7924f6..25061e6 100644 (file)
@@ -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 >>";