llvm-project/clang/lib/Basic
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
..
Builtins.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
CMakeLists.txt Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq 2011-04-15 22:04:17 +00:00
ConvertUTF.c Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
Diagnostic.cpp Implement '-Weverything', which enables all warnings except those explicitly mapped to be ignored. 2011-08-18 01:12:56 +00:00
DiagnosticIDs.cpp Implement '-Weverything', which enables all warnings except those explicitly mapped to be ignored. 2011-08-18 01:12:56 +00:00
FileManager.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
FileSystemStatCache.cpp Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}. 2010-12-17 21:22:22 +00:00
IdentifierTable.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
Makefile Basic: Simplify getClangRepositoryPath and getClangRevision. 2010-09-29 19:15:29 +00:00
SourceLocation.cpp Clean up as many of the comments in Basic I can find to talk in terms of 2011-07-26 05:17:23 +00:00
SourceManager.cpp Boost the efficiency of SourceManager::getMacroArgExpandedLocation. 2011-08-21 23:33:04 +00:00
TargetInfo.cpp Add partial support for using anonymous bitfields (e.g., int : 0) to enforce 2011-08-04 01:21:14 +00:00
Targets.cpp "-mavx" should also enable all other SSE levels. 2011-08-18 00:07:03 +00:00
TokenKinds.cpp This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling. 2009-11-28 16:09:28 +00:00
Version.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
VersionTuple.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00