diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-20 16:52:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-20 16:52:03 +0000 |
commit | 77e9de50a112dc3f0bee0d43469db4bde47225c9 (patch) | |
tree | 839d0805434f98057a49f5216acde711300486d3 /clang/Lex/MacroExpander.cpp | |
parent | dc5c055fd1b31a0f5b11030a4e6ea5d6f2ed7d86 (diff) | |
download | bcm5719-llvm-77e9de50a112dc3f0bee0d43469db4bde47225c9.tar.gz bcm5719-llvm-77e9de50a112dc3f0bee0d43469db4bde47225c9.zip |
simplify the lexer ctor to take a SLoc instead of a sloc and a redundant buffer*.
llvm-svn: 40104
Diffstat (limited to 'clang/Lex/MacroExpander.cpp')
-rw-r--r-- | clang/Lex/MacroExpander.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/Lex/MacroExpander.cpp b/clang/Lex/MacroExpander.cpp index 9a80ac3c3fb..53ff3f14ca0 100644 --- a/clang/Lex/MacroExpander.cpp +++ b/clang/Lex/MacroExpander.cpp @@ -578,13 +578,8 @@ void MacroExpander::PasteTokens(LexerToken &Tok) { SourceManager &SourceMgr = PP.getSourceManager(); const char *ResultStrData = SourceMgr.getCharacterData(ResultTokLoc); - unsigned FileID = ResultTokLoc.getFileID(); - assert(FileID && "Could not get FileID for paste?"); - // Make a lexer object so that we lex and expand the paste result. - Lexer *TL = new Lexer(SourceMgr.getBuffer(FileID), - SourceLocation::getFileLoc(FileID, 0), PP, - ResultStrData, + Lexer *TL = new Lexer(ResultTokLoc, PP, ResultStrData, ResultStrData+LHSLen+RHSLen /*don't include null*/); // Lex a token in raw mode. This way it won't look up identifiers |