llvm-project/clang/lib/Basic
Richard Smith d230de27f8 Remove and replace DiagStatePoint tracking and lookup data structure.
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
2017-01-26 01:01:01 +00:00
..
Attributes.cpp Ignore the "novtable" declspec when not using the Microsoft C++ ABI. 2015-07-20 22:57:31 +00:00
Builtins.cpp [OpenCL] Make OpenCL Builtins added according to the right version. 2016-07-04 16:07:18 +00:00
CMakeLists.txt [cmake] Use LLVM_CMAKE_PATH for GetSVN script 2016-10-19 12:21:39 +00:00
CharInfo.cpp
Cuda.cpp [CUDA] Fix "control reaches end of non-void function" warnings in Cuda.cpp. 2016-07-07 01:06:59 +00:00
Diagnostic.cpp Remove and replace DiagStatePoint tracking and lookup data structure. 2017-01-26 01:01:01 +00:00
DiagnosticIDs.cpp Remove and replace DiagStatePoint tracking and lookup data structure. 2017-01-26 01:01:01 +00:00
DiagnosticOptions.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
FileManager.cpp Turn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC) 2016-10-11 07:31:29 +00:00
FileSystemStatCache.cpp [VFS] Replace TimeValue usage with std::chrono 2016-11-09 10:52:22 +00:00
IdentifierTable.cpp Add some more asserts to clearly indicate that there are special cases 2016-11-04 06:32:57 +00:00
LangOptions.cpp Do not print include_next/pragma once warnings when input is a header. 2016-10-27 14:17:10 +00:00
Module.cpp [Modules] Add 'no_undeclared_includes' module map attribute 2016-10-21 01:41:56 +00:00
ObjCRuntime.cpp Watch and TV OS: wire up basic ABI choices 2015-10-30 16:30:36 +00:00
OpenMPKinds.cpp [OpenMP] Codegen support for 'target teams' on the host. 2017-01-25 02:18:43 +00:00
OperatorPrecedence.cpp [OpenCL] Adding reserved operator logical xor for OpenCL 2016-02-03 15:17:14 +00:00
SanitizerBlacklist.cpp Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid(). 2015-10-03 05:15:57 +00:00
Sanitizers.cpp Pull trivial SanitizerSet methods into the header. 2015-07-14 15:34:19 +00:00
SourceLocation.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SourceManager.cpp Drop a redundant ".get()" call (NFC) 2016-10-18 18:19:02 +00:00
TargetInfo.cpp [inline-asm]No error for conflict between inputs\outputs and clobber list 2016-12-26 12:23:42 +00:00
Targets.cpp AMDGPU: Update for changed subtarget feature name 2017-01-23 22:31:14 +00:00
TokenKinds.cpp
Version.cpp Revert r223578, perf data collection depends on the old symbol name. 2014-12-10 23:49:03 +00:00
VersionTuple.cpp MS ABI: Implement driver-level support for thread-safe statics 2015-03-22 08:39:22 +00:00
VirtualFileSystem.cpp Replace use of chdir with llvm::sys::fs::set_current_path 2017-01-24 11:14:29 +00:00
Warnings.cpp Use -Rblah, not -Wblah, to control remark diagnostics. This was always the 2014-08-07 00:24:21 +00:00