diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-27 06:27:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-27 06:27:13 +0000 |
commit | 52c29081281955d3db9e11d10573b2d38f709099 (patch) | |
tree | 28948e3c2b20fb85ca2870abe1f5ba32d2524820 /lib/Rewrite | |
parent | 5f0e9325adee74323514469ccc9a78f4facd66b0 (diff) |
rename getFullFilePos -> getFileOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r-- | lib/Rewrite/HTMLRewrite.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |