llvm-project/clang/test/PCH/Inputs
Argyrios Kyrtzidis d7c16b2543 [PCH] Remove the stat cache from the PCH file.
The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:

-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
  -The same header is referenced in an #include with different filename cases.
  -In the PCH, of course, we record only one file entry for the header file
  -But we cache in the PCH file the stat info for both filename cases

-Then the source files are updated and the header file is updated in a way that
 its size and modification time are the same but its inode changes

-When using the PCH:
  -We validate the headers, we check that header file and we create a file entry with its current inode
  -There's another #include with a filename with different case than the previously created file entry
  -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
  -because of the different inodes, we think they are different files so we go ahead and include its contents.

Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).

This fixes rdar://5502805

llvm-svn: 167172
2012-10-31 20:59:50 +00:00
..
badpch-dir.h.gch Move the input files for test/PCH/badpch.c under test/PCH/Inputs/. 2012-10-25 19:43:57 +00:00
__va_list_tag.h PR13189: va_list broken with precompiled headers 2012-07-01 15:57:25 +00:00
arc.h objc-arc: bridge casts in non-arc mode are now 2011-12-19 22:52:53 +00:00
badpch-empty.h.gch Move the input files for test/PCH/badpch.c under test/PCH/Inputs/. 2012-10-25 19:43:57 +00:00
case-insensitive-include.h [PCH] Remove the stat cache from the PCH file. 2012-10-31 20:59:50 +00:00
chain-decls1.h
chain-decls2.h
chain-ext_vector1.h
chain-ext_vector2.h
chain-external-defs1.h
chain-external-defs2.h
chain-macro-override1.h Rework the (de-)serialization of macros, as stored in 2012-10-09 23:05:51 +00:00
chain-macro-override2.h Rework the (de-)serialization of macros, as stored in 2012-10-09 23:05:51 +00:00
chain-macro1.h
chain-macro2.h
chain-remap-types1.h Fix a marvelous chained AST writing bug, where we end up with the 2010-10-05 18:37:06 +00:00
chain-remap-types2.h Fix a marvelous chained AST writing bug, where we end up with the 2010-10-05 18:37:06 +00:00
chain-selectors1.h
chain-selectors2.h
chain-trivial1.h
chain-trivial2.h
cxx-method.h When writing out the entries in a lookup table for a DeclContext, make 2011-08-30 20:49:19 +00:00
cxx11-statement-attributes.h Added a test for C++11 statement attributes serialization. 2012-10-02 23:11:53 +00:00
namespaces.h Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>. 2010-10-05 20:41:58 +00:00
preamble.h
typo.h When performing typo correction, look through the set of known 2010-10-14 22:11:03 +00:00
typo.hpp Add support for C++ namespace-aware typo correction, e.g., correcting 2011-06-28 16:20:02 +00:00
va_arg.h Register the __builtin_va_list_type node when we parse it, rather than 2010-10-05 14:55:45 +00:00
working-directory-1.h When writing file references in a pch, make sure to ask the file manager for the absolute path. 2011-03-08 16:04:35 +00:00