aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-18 06:51:15 +0000
committerChris Lattner <sabre@nondot.org>2008-11-18 06:51:15 +0000
commitf812a45dd93634c9300ed5533bd26b56374714a1 (patch)
tree0741b84f8ee2e0ce6c63cd9cf3181ef4329b8c4b /lib/Basic/SourceManager.cpp
parent470e5fc7b4e03105950ad62cf7582b14ca939ec4 (diff)
SourceManager::getLineNumber is logically const except for caching.
Use mutable to make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index b8b72878f5..44a6d66c1a 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -238,7 +238,7 @@ static void ComputeLineNumbers(ContentCache* FI) {
/// for the position indicated. This requires building and caching a table of
/// line offsets for the MemoryBuffer, so this is not cheap: use only when
/// about to emit a diagnostic.
-unsigned SourceManager::getLineNumber(SourceLocation Loc) {
+unsigned SourceManager::getLineNumber(SourceLocation Loc) const {
unsigned FileID = Loc.getFileID();
if (FileID == 0) return 0;