aboutsummaryrefslogtreecommitdiff
path: root/Lex/MacroExpander.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-20 16:52:03 +0000
committerChris Lattner <sabre@nondot.org>2007-07-20 16:52:03 +0000
commit25bdb51276d3bfc180a68688082071505a00ed27 (patch)
treea0184999e596fe95b48dbeffae0988e1a3101ada /Lex/MacroExpander.cpp
parent9dc1f530c086d2c16f8cba758b0f59a5bf41323a (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.cpp7
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