History log of /external/clang/lib/Serialization/Module.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Serialization/Module.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Serialization/Module.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Serialization/Module.cpp
36592b1fa381a978b1b6d4b97c66fb274915fe50 06-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] We don't need to instantiate HeaderFileInfoTrait in ASTReader more than once.

We can just re-use the one from HeaderFileInfoLookupTable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
4182ed686283b72736b287cbe28583cb641f8934 31-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
745e6f168d0276c15fb72f3d90e3d93d60282b1b 19-Oct-2012 Douglas Gregor <dgregor@apple.com> Move the set of files to be validated in an AST file into the control
block, so the input files are validated early on, before we've
committed to loading the AST file. This (accidentally) fixed a but
wherein the main file used to generate the AST file would *not* be
validated by the existing validation logic.

At the moment, this leads to some duplication of filenames between the
source manager block and input-file blocks, as well as validation
logic. This will be handled via an upcoming patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
a8235d6c4093cd38dcf742909651f867de62e55b 10-Oct-2012 Douglas Gregor <dgregor@apple.com> Rework the (de-)serialization of macros, as stored in
MacroInfo*. Instead of simply dumping an offset into the current file,
give each macro definition a proper ID with all of the standard
modules-remapping facilities. Additionally, when a macro is modified
in a subsequent AST file (e.g., #undef'ing a macro loaded from another
module or from a precompiled header), provide a macro update record
rather than rewriting the entire macro definition. This gives us
greater consistency with the way we handle declarations, and ties
together macro definitions much more cleanly.

Note that we're still not actually deserializing macro history (we
never were), but it's far easy to do properly now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
d64c26f6676eef69d1713f353ca8a3c2fe963f17 03-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set the file entry for a Module* that was created during deserialization
of a module file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
2093e0bc4e436b1b2791d5423fb3274dd37231b8 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing an AST file, only deserialize the file level
declarations of the current primary module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
b1758c662524e18d65d260188fdcbbdee6a9316b 15-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Use forward declarations for ASTDeclContextNameLookupTable and add a missing delete.

It would be nice to use OwningPtr here, but DeclContextInfo is stored in a DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
cff9f26ce0ed76d555cd33b3dca84dd5cdf376af 27-Jan-2012 Douglas Gregor <dgregor@apple.com> Reimplement (de-)serialization of Objective-C categories to eliminate
the direct serialization of the linked-list structure. Instead, use a
scheme similar to how we handle redeclarations, with redeclaration
lists on the side. This addresses several issues:
- In cases involving mixing and matching of many categories across
many modules, the linked-list structure would not be consistent
across different modules, and categories would get lost.
- If a module is loaded after the class definition and its other
categories have already been loaded, we wouldn't see any categories
in the newly-loaded module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
057df20b3107cef764052d271c89b8591b98b3ce 18-Jan-2012 Douglas Gregor <dgregor@apple.com> Optimize unqualified/global name lookup in modules by introducing a
generational scheme for identifiers that avoids searching the hash
tables of a given module more than once for a given
identifier. Previously, loading any new module invalidated all of the
previous lookup results for all identifiers, causing us to perform the
lookups repeatedly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
2171bf1caba4d4b9eeb6a91efac4300b41f38b07 15-Jan-2012 Douglas Gregor <dgregor@apple.com> Completely re-implement (de-)serialization of redeclaration
chains, again. The prior implementation was very linked-list oriented, and
the list-splicing logic was both fairly convoluted (when loading from
multiple modules) and failed to preserve a reasonable ordering for the
redeclaration chains.

This new implementation uses a simpler strategy, where we store the
ordered redeclaration chains in an array-like structure (indexed based
on the first declaration), and use that ordering to add individual
deserialized declarations to the end of the existing chain. That way,
the chain mimics the ordering from its modules, and a bug somewhere is
far less likely to result in a broken linked list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
4a08268a6953b3ce77691d3a8a7589e7cdeea947 27-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Initialize member that ends up in PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
a1be278c4f3a234ff61f04018d26c6beecde1654 18-Dec-2011 Douglas Gregor <dgregor@apple.com> Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.

The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed).

As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.

This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
26ced127b7d443fcf3472463c9f39c2376bd9d70 01-Dec-2011 Douglas Gregor <dgregor@apple.com> Switch the ID numbers used for submodule IDs in the AST reader over to
a standard global/local scheme, so that submodule definitions will
eventually be able to refer to submodules in other top-level
modules. We'll need this functionality soonish.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
1a4761edca58c6b559de825b9abfb66f7f1ba94a 01-Dec-2011 Douglas Gregor <dgregor@apple.com> Promote ModuleMap::Module to a namespace-scope class in the Basic
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
10f3df54486385e6497c9e5f229ff816e5a6c511 29-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Keep track of file-level declarations that are contained by files.

Introduce a FILE_SORTED_DECLS [de]serialization record that contains
a file sorted array of file-level DeclIDs in a PCH/Module.
The rationale is to allow "targeted" deserialization of decls inside
a range of a source file.

Cocoa PCH increased by 0.8%
Difference of creation time for Cocoa PCH is below the noise level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
e24692b30adbe8144597678a0e3354912e99c747 15-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Overhaul how preprocessed entities are [de]serialized.

-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
for references to macro definitions use an index inside the preprocessed
entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.

Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp
98339b96a8089a6da715487e432c5abfca0ca0df 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Factor the Module and ModuleManager classes out into separate headers
and .cpp files, since ASTReader.cpp was getting way too large. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Serialization/Module.cpp