diff options
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r-- | lib/Lex/TokenLexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index fde29359fd..7e56a43c44 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -392,11 +392,11 @@ bool TokenLexer::PasteTokens(Token &Tok) { SourceManager &SourceMgr = PP.getSourceManager(); const char *ResultStrData = SourceMgr.getCharacterData(ResultTokLoc); - const llvm::MemoryBuffer *Buffer = SourceMgr.getBuffer(ResultTokLoc); - // Make a lexer object so that we lex and expand the paste result. - Lexer TL(ResultTokLoc, PP.getLangOptions(), ResultStrData, - ResultStrData+LHSLen+RHSLen /*don't include null*/, Buffer); + Lexer TL(ResultTokLoc, PP.getLangOptions(), + SourceMgr.getBufferData(ResultTokLoc).first, + ResultStrData, + ResultStrData+LHSLen+RHSLen /*don't include null*/); // Lex a token in raw mode. This way it won't look up identifiers // automatically, lexing off the end will return an eof token, and |