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 | 25bdb51276d3bfc180a68688082071505a00ed27 (patch) | |
tree | a0184999e596fe95b48dbeffae0988e1a3101ada /Lex/MacroExpander.cpp | |
parent | 9dc1f530c086d2c16f8cba758b0f59a5bf41323a (diff) |
simplify the lexer ctor to take a SLoc instead of a sloc and a redundant buffer*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/MacroExpander.cpp')
-rw-r--r-- | Lex/MacroExpander.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lex/MacroExpander.cpp b/Lex/MacroExpander.cpp index 9a80ac3c3f..53ff3f14ca 100644 --- a/Lex/MacroExpander.cpp +++ b/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 |