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
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 094d360..741eddc 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1332,15 +1332,11 @@
case DumpRawTokens: {
SourceManager &SM = PP.getSourceManager();
- std::pair<const char*,const char*> File =
- SM.getBufferData(SM.getMainFileID());
// Start lexing the specified input file.
- Lexer RawLex(SM.getLocForStartOfFile(SM.getMainFileID()),
- PP.getLangOptions(), File.first, File.second);
+ Lexer RawLex(SM.getMainFileID(), SM, PP.getLangOptions());
RawLex.SetKeepWhitespaceMode(true);
Token RawTok;
-
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
PP.DumpToken(RawTok, true);