diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-03 00:59:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-03 00:59:55 +0000 |
commit | f6137e4d15cb6bbd10547267babfc699c1945873 (patch) | |
tree | 1b5aabc0a8300dcfbdfd0e10e39554ba2e605f31 /include/clang/Serialization | |
parent | f394078fde147dcf27e9b6a7965517388d64dcb6 (diff) |
Implement support for precompiled headers, preambles, and serialized
"main" files that import modules. When loading any of these kinds of
AST files, we make the modules that were imported visible into the
translation unit that loaded the PCH file or preamble.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 6 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index 3233a83931..3d234d9085 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -448,7 +448,11 @@ namespace clang { OBJC_CHAINED_CATEGORIES, /// \brief Record code for a file sorted array of DeclIDs in a module. - FILE_SORTED_DECLS + FILE_SORTED_DECLS, + + /// \brief Record code for an array of all of the (sub)modules that were + /// imported by the AST file. + IMPORTED_MODULES }; /// \brief Record types used within a source manager block. diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index e984e306c8..203abe403c 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -541,6 +541,9 @@ private: /// \brief A list of the namespaces we've seen. SmallVector<uint64_t, 4> KnownNamespaces; + /// \brief A list of modules that were imported by precompiled headers or + /// any other non-module AST file. + SmallVector<serialization::SubmoduleID, 2> ImportedModules; //@} /// \brief The original file name that was used to build the primary AST file, |