summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Lex/Preprocessor.cpp')
-rw-r--r--clang/Lex/Preprocessor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp
index c3fd5542646..59ade23f5ce 100644
--- a/clang/Lex/Preprocessor.cpp
+++ b/clang/Lex/Preprocessor.cpp
@@ -281,8 +281,7 @@ SourceLocation Preprocessor::AdvanceToTokenCharacter(SourceLocation TokStart,
// lexer to parse it correctly.
if (CharNo != 0) {
// Create a lexer starting at this token position.
- const llvm::MemoryBuffer *SrcBuf =SourceMgr.getBuffer(TokStart.getFileID());
- Lexer TheLexer(SrcBuf, TokStart, *this, TokPtr);
+ Lexer TheLexer(TokStart, *this, TokPtr);
LexerToken Tok;
// Skip over characters the remaining characters.
const char *TokStartPtr = TokPtr;
@@ -390,9 +389,7 @@ void Preprocessor::EnterSourceFile(unsigned FileID,
if (MaxIncludeStackDepth < IncludeMacroStack.size())
MaxIncludeStackDepth = IncludeMacroStack.size();
- const llvm::MemoryBuffer *Buffer = SourceMgr.getBuffer(FileID);
- Lexer *TheLexer = new Lexer(Buffer, SourceLocation::getFileLoc(FileID, 0),
- *this);
+ Lexer *TheLexer = new Lexer(SourceLocation::getFileLoc(FileID, 0), *this);
if (isMainFile) TheLexer->setIsMainFile();
EnterSourceFileWithLexer(TheLexer, CurDir);
}
OpenPOWER on IntegriCloud