From 37db5d67f92504226c17cfbf98c07c7bbe3afc3b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 1 Apr 2008 03:40:53 +0000 Subject: Remove the MappedFile::charBase member, rename base -> getBase() and make getBase() return a const-correct pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49025 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Debugger/SourceFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Debugger/SourceFile.cpp') diff --git a/lib/Debugger/SourceFile.cpp b/lib/Debugger/SourceFile.cpp index 820fc67f84..75248cd10d 100644 --- a/lib/Debugger/SourceFile.cpp +++ b/lib/Debugger/SourceFile.cpp @@ -28,7 +28,7 @@ void SourceFile::readFile() { /// void SourceFile::calculateLineOffsets() const { assert(LineOffset.empty() && "Line offsets already computed!"); - const char *BufPtr = File.charBase(); + const char *BufPtr = (const char *)File.getBase(); const char *FileStart = BufPtr; const char *FileEnd = FileStart + File.size(); do { @@ -61,12 +61,12 @@ void SourceFile::getSourceLine(unsigned LineNo, const char *&LineStart, if (LineNo >= LineOffset.size()) return; // Otherwise, they are asking for a valid line, which we can fulfill. - LineStart = File.charBase()+LineOffset[LineNo]; + LineStart = (const char *)File.getBase()+LineOffset[LineNo]; if (LineNo+1 < LineOffset.size()) - LineEnd = File.charBase()+LineOffset[LineNo+1]; + LineEnd = (const char *)File.getBase()+LineOffset[LineNo+1]; else - LineEnd = File.charBase() + File.size(); + LineEnd = (const char *)File.getBase() + File.size(); // If the line ended with a newline, strip it off. while (LineEnd != LineStart && (LineEnd[-1] == '\n' || LineEnd[-1] == '\r')) -- cgit v1.2.3