summaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-20 20:49:23 +0000
committerChris Lattner <sabre@nondot.org>2010-04-20 20:49:23 +0000
commit5c5db4e94bd1243ba92563acba51ba66afa94917 (patch)
treef81f78094f722bbea043f73353d8c15717eaadd1 /lib/Basic/SourceManager.cpp
parente127a0d80155b45dafe77f2b4380e5fa111a3345 (diff)
downloadclang-5c5db4e94bd1243ba92563acba51ba66afa94917.tar.gz
change FullSourceLoc to have a *const* SourceManager&, eliminating
a const_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 355b87a9dd..3ecab1d8c1 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -60,7 +60,7 @@ void ContentCache::replaceBuffer(const llvm::MemoryBuffer *B) {
}
const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag,
- const SourceManager &sm,
+ const SourceManager &SM,
SourceLocation Loc,
bool *Invalid) const {
if (Invalid)
@@ -68,9 +68,6 @@ const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag,
// Lazily create the Buffer for ContentCaches that wrap files.
if (!Buffer.getPointer() && Entry) {
- // FIXME:
- SourceManager &SM = const_cast<SourceManager &>(sm);
-
std::string ErrorStr;
struct stat FileInfo;
Buffer.setPointer(MemoryBuffer::getFile(Entry->getName(), &ErrorStr,