diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-18 06:51:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-18 06:51:15 +0000 |
commit | 746d474b28e4df3becec7fbde42d3732f94d7c33 (patch) | |
tree | f163184ad79fe938ed8c71b6f149560d574a8f02 /clang/lib/Basic/SourceManager.cpp | |
parent | 3de58149bda2f1f5c32254c464a78b63598c6cc5 (diff) | |
download | bcm5719-llvm-746d474b28e4df3becec7fbde42d3732f94d7c33.tar.gz bcm5719-llvm-746d474b28e4df3becec7fbde42d3732f94d7c33.zip |
SourceManager::getLineNumber is logically const except for caching.
Use mutable to make it so.
llvm-svn: 59498
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index b8b72878f52..44a6d66c1a6 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/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; |