llvm-project/clang/lib/Frontend
Ilya Biryukov 929af67361 [Lex] Allow to consume tokens while preprocessing
Summary:
By adding a hook to consume all tokens produced by the preprocessor.
The intention of this change is to make it possible to consume the
expanded tokens without re-runnig the preprocessor with minimal changes
to the preprocessor and minimal performance penalty when preprocessing
without recording the tokens.

The added hook is very low-level and reconstructing the expanded token
stream requires more work in the client code, the actual algorithm to
collect the tokens using this hook can be found in the follow-up change.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: eraman, nemanjai, kbarton, jsji, riccibruno, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59885

llvm-svn: 361007
2019-05-17 09:32:05 +00:00
..
Rewrite Modules: Rename MemoryBufferCache to InMemoryModuleCache 2019-03-09 17:33:56 +00:00
ASTConsumers.cpp Introduce the ability to dump the AST to JSON. 2019-05-13 21:39:55 +00:00
ASTMerge.cpp [ASTImporter] Use llvm::Expected and Error in the importer API 2019-05-15 10:29:48 +00:00
ASTUnit.cpp [CodeComplete] Remove obsolete isOutputBinary(). 2019-04-18 17:35:55 +00:00
CMakeLists.txt Move PCHContainerOperations from Frontend to Serialization 2018-12-12 02:53:59 +00:00
ChainedDiagnosticConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ChainedIncludesSource.cpp Modules: Rename MemoryBufferCache to InMemoryModuleCache 2019-03-09 17:33:56 +00:00
CompilerInstance.cpp [CodeComplete] Remove obsolete isOutputBinary(). 2019-04-18 17:35:55 +00:00
CompilerInvocation.cpp Temporarily revert "Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)" 2019-05-14 19:40:42 +00:00
CreateInvocationFromCommandLine.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DependencyFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DependencyGraph.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticRenderer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FrontendAction.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00
FrontendActions.cpp Introduce the ability to dump the AST to JSON. 2019-05-13 21:39:55 +00:00
FrontendOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FrontendTiming.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00
HeaderIncludeGen.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00
InitHeaderSearch.cpp Remove OpenBSD case for old system libstdc++ header path as OpenBSD 2019-02-23 07:21:19 +00:00
InitPreprocessor.cpp [SPIR] Simplified target checking. 2019-05-09 10:25:45 +00:00
LangStandards.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LayoutOverrideSource.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LogDiagnosticPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleDependencyCollector.cpp [ModuleDependencyCollector] Use llvm::sys::fs::real_path (NFC) 2019-01-30 06:26:26 +00:00
MultiplexConsumer.cpp [OPENMP 5.0]Add initial support for 'allocate' directive. 2019-03-07 17:54:44 +00:00
PrecompiledPreamble.cpp Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer* 2019-04-04 21:06:41 +00:00
PrintPreprocessedOutput.cpp [Lex] Allow to consume tokens while preprocessing 2019-05-17 09:32:05 +00:00
SerializedDiagnosticPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SerializedDiagnosticReader.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TestModuleFileExtension.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TestModuleFileExtension.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TextDiagnostic.cpp Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
TextDiagnosticBuffer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TextDiagnosticPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VerifyDiagnosticConsumer.cpp [verify] Add support for location markers in directives. 2019-04-13 04:33:39 +00:00