llvm-project/clang/lib/Serialization
Argyrios Kyrtzidis 61ef3db222 Boost the efficiency of SourceManager::getMacroArgExpandedLocation.
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
2011-08-21 23:33:04 +00:00
..
ASTCommon.cpp Make yet another placeholder type, this one marking that an expression is a bound 2011-04-26 20:42:42 +00:00
ASTCommon.h Migrate the serialization of ASTContext's AutoDeduceTy and 2011-08-09 15:13:55 +00:00
ASTReader.cpp Boost the efficiency of SourceManager::getMacroArgExpandedLocation. 2011-08-21 23:33:04 +00:00
ASTReaderDecl.cpp Add serialization support for ClassScopeFunctionSpecializationDecl. 2011-08-17 01:06:54 +00:00
ASTReaderStmt.cpp Use the local -> global mapping functions for selectors more 2011-07-28 21:16:51 +00:00
ASTWriter.cpp Boost the efficiency of SourceManager::getMacroArgExpandedLocation. 2011-08-21 23:33:04 +00:00
ASTWriterDecl.cpp Remove an unnecessary assignment (to InstFromD). 2011-08-17 21:35:28 +00:00
ASTWriterStmt.cpp Add support for C++0x unicode string and character literals, from Craig Topper! 2011-07-27 05:40:30 +00:00
CMakeLists.txt Fix CMake build. 2011-03-09 21:12:34 +00:00
ChainedIncludesSource.cpp Following up the earlier refactoring/cleanup work by fixing up how we manage the virtual files the ASTReader has to handle. Specifically, this occurs when the reader is reading AST files that were created in memory and not written to disk. For example, when a user creates a chained PCH using command line flags. These virtual files are stored in MemoryBuffers in ChainIncludeSource.cpp, and then read back in by the ASTReader. This patch moves the management of these buffers into the ModuleManager, so that it becomes the authority on where these buffers are located. 2011-08-02 17:40:32 +00:00
GeneratePCH.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
Makefile Reintroduce the serialization library, with fixed dependencies. 2010-08-17 20:43:28 +00:00