aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index fa0a9bb565..1240262007 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -56,9 +56,7 @@ const llvm::MemoryBuffer* ContentCache::getBuffer() const {
if (!Buffer && Entry) {
// FIXME: Should we support a way to not have to do this check over
// and over if we cannot open the file?
- // FIXME: This const_cast is ugly. Should we make getBuffer() non-const?
- const_cast<ContentCache*>(this)->Buffer =
- MemoryBuffer::getFile(Entry->getName(), 0, Entry->getSize());
+ Buffer = MemoryBuffer::getFile(Entry->getName(), 0, Entry->getSize());
}
#endif
return Buffer;