[cfe-commits] r41600 - in /cfe/trunk: Basic/SourceManager.cpp include/clang/Basic/SourceManager.h

Chris Lattner sabre at nondot.org
Wed Aug 29 22:59:30 PDT 2007


Author: lattner
Date: Thu Aug 30 00:59:30 2007
New Revision: 41600

URL: http://llvm.org/viewvc/llvm-project?rev=41600&view=rev
Log:
constify a method.


Modified:
    cfe/trunk/Basic/SourceManager.cpp
    cfe/trunk/include/clang/Basic/SourceManager.h

Modified: cfe/trunk/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/SourceManager.cpp?rev=41600&r1=41599&r2=41600&view=diff

==============================================================================
--- cfe/trunk/Basic/SourceManager.cpp (original)
+++ cfe/trunk/Basic/SourceManager.cpp Thu Aug 30 00:59:30 2007
@@ -234,7 +234,7 @@
 /// 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();

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=41600&r1=41599&r2=41600&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Thu Aug 30 00:59:30 2007
@@ -240,7 +240,7 @@
   /// 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.





More information about the cfe-commits mailing list