diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-01 03:40:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-01 03:40:53 +0000 |
commit | bcfa564759423f40be305124bb6ad88b531f69ae (patch) | |
tree | a3d5ca0234d75ab971fefb75bda397a5b2a224c6 /llvm/lib/Debugger | |
parent | 314a1414d03aa3fcad6f2a0613f6b80dd5ee2bfd (diff) | |
download | bcm5719-llvm-bcfa564759423f40be305124bb6ad88b531f69ae.tar.gz bcm5719-llvm-bcfa564759423f40be305124bb6ad88b531f69ae.zip |
Remove the MappedFile::charBase member, rename base -> getBase() and
make getBase() return a const-correct pointer.
llvm-svn: 49025
Diffstat (limited to 'llvm/lib/Debugger')
-rw-r--r-- | llvm/lib/Debugger/SourceFile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Debugger/SourceFile.cpp b/llvm/lib/Debugger/SourceFile.cpp index 820fc67f846..75248cd10da 100644 --- a/llvm/lib/Debugger/SourceFile.cpp +++ b/llvm/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')) |