summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-09 22:10:18 +0000
committerChris Lattner <sabre@nondot.org>2007-10-09 22:10:18 +0000
commit1f1b0dbc28b565daadce7927e3f1178c9a0a6888 (patch)
tree2d711cdae74d32199ac825911aa4cf1463455735 /clang/Lex/Lexer.cpp
parentc62adb6d1a185870ce57766cd20e793545863683 (diff)
downloadbcm5719-llvm-1f1b0dbc28b565daadce7927e3f1178c9a0a6888.tar.gz
bcm5719-llvm-1f1b0dbc28b565daadce7927e3f1178c9a0a6888.zip
Make a significant change to invert the control flow handling
predefined macros. Previously, these were handled by the driver, now they are handled by the preprocessor. Some fallout of this: 1. Instead of preprocessing two buffers (the predefines, then the main source file) we now start preprocessing the main source file and inject the predefines as a "psuedo #include" from the main source file. 2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify Preprocessor::isInPrimaryFile. 3. The driver doesn't have to know about standard #defines, the preprocessor knows, which is nice for people wanting to define their own drivers. 4. This allows us to put normal tokens in the predefine buffer, for example a definition for __builtin_va_list that is target-specific, and a typedef for id in objc. llvm-svn: 42818
Diffstat (limited to 'clang/Lex/Lexer.cpp')
-rw-r--r--clang/Lex/Lexer.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp
index a14e51fa6a6..a7a58f0b1fb 100644
--- a/clang/Lex/Lexer.cpp
+++ b/clang/Lex/Lexer.cpp
@@ -65,7 +65,6 @@ Lexer::Lexer(SourceLocation fileloc, Preprocessor &pp,
const llvm::MemoryBuffer *InputFile = SourceMgr.getBuffer(InputFileID);
Is_PragmaLexer = false;
- IsMainFile = false;
InitCharacterInfo();
// BufferStart must always be InputFile->getBufferStart().
OpenPOWER on IntegriCloud