From 52c29081281955d3db9e11d10573b2d38f709099 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 27 Jan 2009 06:27:13 +0000 Subject: rename getFullFilePos -> getFileOffset. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63097 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Rewrite/HTMLRewrite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Rewrite/HTMLRewrite.cpp') diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index b5f0fc3951..6e5d1c32b1 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -36,8 +36,8 @@ void html::HighlightRange(Rewriter &R, SourceLocation B, SourceLocation E, FileID FID = SM.getFileID(B); assert(SM.getFileID(E) == FID && "B/E not in the same file!"); - unsigned BOffset = SM.getFullFilePos(B); - unsigned EOffset = SM.getFullFilePos(E); + unsigned BOffset = SM.getFileOffset(B); + unsigned EOffset = SM.getFileOffset(E); // Include the whole end token in the range. EOffset += Lexer::MeasureTokenLength(E, R.getSourceMgr()); @@ -359,7 +359,7 @@ void html::SyntaxHighlight(Rewriter &R, FileID FID, Preprocessor &PP) { while (Tok.isNot(tok::eof)) { // Since we are lexing unexpanded tokens, all tokens are from the main // FileID. - unsigned TokOffs = SourceMgr.getFullFilePos(Tok.getLocation()); + unsigned TokOffs = SourceMgr.getFileOffset(Tok.getLocation()); unsigned TokLen = Tok.getLength(); switch (Tok.getKind()) { default: break; @@ -397,7 +397,7 @@ void html::SyntaxHighlight(Rewriter &R, FileID FID, Preprocessor &PP) { unsigned TokEnd = TokOffs+TokLen; L.LexFromRawLexer(Tok); while (!Tok.isAtStartOfLine() && Tok.isNot(tok::eof)) { - TokEnd = SourceMgr.getFullFilePos(Tok.getLocation())+Tok.getLength(); + TokEnd = SourceMgr.getFileOffset(Tok.getLocation())+Tok.getLength(); L.LexFromRawLexer(Tok); } -- cgit v1.2.3-18-g5258