aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteMacros.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-17 07:41:36 +0000
committerChris Lattner <sabre@nondot.org>2009-01-17 07:41:36 +0000
commit4448a0167806b9d2eb07f622f42f92de82e951ce (patch)
tree6a7ec47cf3f701c19945a053fdeb0d2b0c5e67c3 /Driver/RewriteMacros.cpp
parent025c3a66402fb713c2d9bf5dc174ff264765379a (diff)
use simplified Lexer ctor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteMacros.cpp')
-rw-r--r--Driver/RewriteMacros.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Driver/RewriteMacros.cpp b/Driver/RewriteMacros.cpp
index ecf4b416d8..6ad4a7160c 100644
--- a/Driver/RewriteMacros.cpp
+++ b/Driver/RewriteMacros.cpp
@@ -61,12 +61,10 @@ static const Token &GetNextRawTok(const std::vector<Token> &RawTokens,
static void LexRawTokensFromMainFile(Preprocessor &PP,
std::vector<Token> &RawTokens) {
SourceManager &SM = PP.getSourceManager();
- std::pair<const char*,const char*> File =SM.getBufferData(SM.getMainFileID());
// Create a lexer to lex all the tokens of the main file in raw mode. Even
// though it is in raw mode, it will not return comments.
- Lexer RawLex(SM.getLocForStartOfFile(SM.getMainFileID()),
- PP.getLangOptions(), File.first, File.second);
+ Lexer RawLex(SM.getMainFileID(), SM, PP.getLangOptions());
// Switch on comment lexing because we really do want them.
RawLex.SetCommentRetentionState(true);