llvm-project/clang/lib
Douglas Gregor 3f4bea0646 Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.

llvm-svn: 109445
2010-07-26 21:36:20 +00:00
..
AST It's not necessary to call flush() on a raw_ostream immediately prior 2010-07-26 21:29:50 +00:00
Analysis Fix namespace polution. 2010-07-26 21:25:24 +00:00
Basic Introduce basic support for loading a precompiled preamble while 2010-07-26 21:36:20 +00:00
Checker Added an path-sensitive unreachable code checker to the experimental analyzer checks. 2010-07-23 23:04:53 +00:00
CodeGen Revert 109303. 2010-07-26 18:49:27 +00:00
Driver Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86. 2010-07-22 01:47:22 +00:00
Frontend Introduce basic support for loading a precompiled preamble while 2010-07-26 21:36:20 +00:00
Headers Add alternate names for x86 SIMD intrinsics. These aren't as common, but show 2010-07-22 06:47:28 +00:00
Index Remove unused location-to-AST-node resolver. libclang's implementation supercedes it 2010-07-19 16:18:30 +00:00
Lex Introduce basic support for loading a precompiled preamble while 2010-07-26 21:36:20 +00:00
Parse Add source location information to C++ base specifiers. 2010-07-26 16:56:01 +00:00
Rewrite Fix source location of the initializer in 2010-07-21 18:31:47 +00:00
Sema Minor code simplification. 2010-07-26 21:33:22 +00:00
CMakeLists.txt Split libAnalysis into two libraries: libAnalysis and libChecker. 2010-01-25 04:41:41 +00:00
Makefile Move lib/Runtime to runtime/, and build after everything else. 2010-06-30 22:10:38 +00:00