aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/TokenRewriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-17 07:35:14 +0000
committerChris Lattner <sabre@nondot.org>2009-01-17 07:35:14 +0000
commit025c3a66402fb713c2d9bf5dc174ff264765379a (patch)
tree9a7d1d7292856fbe5322c27ddc30467b5e35cebe /lib/Rewrite/TokenRewriter.cpp
parent22d91ca8d7c134eac5cc6a4869e6a84c461ad624 (diff)
add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/TokenRewriter.cpp')
-rw-r--r--lib/Rewrite/TokenRewriter.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Rewrite/TokenRewriter.cpp b/lib/Rewrite/TokenRewriter.cpp
index 85d83c2dea..aab6fb0cce 100644
--- a/lib/Rewrite/TokenRewriter.cpp
+++ b/lib/Rewrite/TokenRewriter.cpp
@@ -22,11 +22,8 @@ TokenRewriter::TokenRewriter(FileID FID, SourceManager &SM,
const LangOptions &LangOpts) {
ScratchBuf.reset(new ScratchBuffer(SM));
- std::pair<const char*,const char*> File = SM.getBufferData(FID);
-
// Create a lexer to lex all the tokens of the main file in raw mode.
- Lexer RawLex(SM.getLocForStartOfFile(FID),
- LangOpts, File.first, File.second);
+ Lexer RawLex(FID, SM, LangOpts);
// Return all comments and whitespace as tokens.
RawLex.SetKeepWhitespaceMode(true);