forked from OSchip/llvm-project
61ef3db222
Currently getMacroArgExpandedLocation is very inefficient and for the case of a location pointing at the main file it will end up checking almost all of the SLocEntries. Make it faster: -Use a map of macro argument chunks to their expanded source location. The map is for a single source file, it's stored in the file's ContentCache and lazily computed, like the source lines cache. -In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track of the number of FileIDs (files and macros) that were created during preprocessing of that particular file SLocEntry. This is useful when computing the macro argument map in skipping included files while scanning for macro arg FileIDs that lexed from a specific source file. Due to padding, the new field does not increase the size of SLocEntry. llvm-svn: 138225 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
HeaderMap.cpp | ||
HeaderSearch.cpp | ||
Lexer.cpp | ||
LiteralSupport.cpp | ||
MacroArgs.cpp | ||
MacroArgs.h | ||
MacroInfo.cpp | ||
Makefile | ||
PPCaching.cpp | ||
PPDirectives.cpp | ||
PPExpressions.cpp | ||
PPLexerChange.cpp | ||
PPMacroExpansion.cpp | ||
PTHLexer.cpp | ||
Pragma.cpp | ||
PreprocessingRecord.cpp | ||
Preprocessor.cpp | ||
PreprocessorLexer.cpp | ||
ScratchBuffer.cpp | ||
TokenConcatenation.cpp | ||
TokenLexer.cpp |