]> granicus.if.org Git - clang/commitdiff
constify a method.
authorChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 05:59:30 +0000 (05:59 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 05:59:30 +0000 (05:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41600 91177308-0d34-0410-b5e6-96231b3b80d8

Basic/SourceManager.cpp
include/clang/Basic/SourceManager.h

index 4d525fc2bd0245430c1ab56a16f55663cad7d35a..96da7634511cdeafd3ee0c9612debd11f819f20a 100644 (file)
@@ -234,7 +234,7 @@ unsigned SourceManager::getColumnNumber(SourceLocation Loc) const {
 /// getSourceName - This method returns the name of the file or buffer that
 /// the SourceLocation specifies.  This can be modified with #line directives,
 /// etc.
-const char *SourceManager::getSourceName(SourceLocation Loc) {
+const char *SourceManager::getSourceName(SourceLocation Loc) const {
   unsigned FileID = Loc.getFileID();
   if (FileID == 0) return "";
   return getFileInfo(FileID)->Buffer->getBufferIdentifier();
index 825e7dee65ab175588c51df3fd8ba17d13660d33..f479b94e5d6ecd24a9a0d91e62a67c71ea2362cb 100644 (file)
@@ -240,7 +240,7 @@ public:
   /// getSourceName - This method returns the name of the file or buffer that
   /// the SourceLocation specifies.  This can be modified with #line directives,
   /// etc.
-  const char *getSourceName(SourceLocation Loc);
+  const char *getSourceName(SourceLocation Loc) const;
 
   /// Given a SourceLocation object, return the logical location referenced by
   /// the ID.  This logical location is subject to #line directives, etc.