forked from OSchip/llvm-project
d230de27f8
Rather than storing a single flat list of SourceLocations where the diagnostic state changes (in source order), we now store a separate list for each FileID in which there is a diagnostic state transition. (State for other files is built and cached lazily, on demand.) This has two consequences: 1) We can now sensibly support modules, and properly track the diagnostic state for modular headers (this matters when, for instance, triggering instantiation of a template defined within a module triggers diagnostics). 2) It's much faster than the old approach, since we can now just do a binary search on the offsets within the FileID rather than needing to call isBeforeInTranslationUnit to determine source order (which is surprisingly slow). For some pathological (but real world) files, this reduces total compilation time by more than 10%. For now, the diagnostic state points for modules are loaded eagerly. It seems feasible to defer this until diagnostic state information for one of the module's files is needed, but that's not part of this patch. llvm-svn: 293123 |
||
---|---|---|
.. | ||
Attributes.cpp | ||
Builtins.cpp | ||
CMakeLists.txt | ||
CharInfo.cpp | ||
Cuda.cpp | ||
Diagnostic.cpp | ||
DiagnosticIDs.cpp | ||
DiagnosticOptions.cpp | ||
FileManager.cpp | ||
FileSystemStatCache.cpp | ||
IdentifierTable.cpp | ||
LangOptions.cpp | ||
Module.cpp | ||
ObjCRuntime.cpp | ||
OpenMPKinds.cpp | ||
OperatorPrecedence.cpp | ||
SanitizerBlacklist.cpp | ||
Sanitizers.cpp | ||
SourceLocation.cpp | ||
SourceManager.cpp | ||
TargetInfo.cpp | ||
Targets.cpp | ||
TokenKinds.cpp | ||
Version.cpp | ||
VersionTuple.cpp | ||
VirtualFileSystem.cpp | ||
Warnings.cpp |