summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Pragma.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
commit77e9de50a112dc3f0bee0d43469db4bde47225c9 (patch)
tree839d0805434f98057a49f5216acde711300486d3 /clang/Lex/Pragma.cpp
parentdc5c055fd1b31a0f5b11030a4e6ea5d6f2ed7d86 (diff)
downloadbcm5719-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/Pragma.cpp')
-rw-r--r--clang/Lex/Pragma.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/Lex/Pragma.cpp b/clang/Lex/Pragma.cpp
index 596b7e76e46..d717d040a5e 100644
--- a/clang/Lex/Pragma.cpp
+++ b/clang/Lex/Pragma.cpp
@@ -140,12 +140,9 @@ void Preprocessor::Handle_Pragma(LexerToken &Tok) {
SourceLocation TokLoc = CreateString(&StrVal[0], StrVal.size(), StrLoc);
const char *StrData = SourceMgr.getCharacterData(TokLoc);
- unsigned FileID = SourceMgr.getPhysicalLoc(TokLoc).getFileID();
- assert(FileID && "Could not get FileID for _Pragma?");
-
// Make and enter a lexer object so that we lex and expand the tokens just
// like any others.
- Lexer *TL = new Lexer(SourceMgr.getBuffer(FileID), TokLoc, *this,
+ Lexer *TL = new Lexer(TokLoc, *this,
StrData, StrData+StrVal.size()-1 /* no null */);
// Ensure that the lexer thinks it is inside a directive, so that end \n will
OpenPOWER on IntegriCloud