aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r--include/clang/Serialization/ASTReader.h10
-rw-r--r--include/clang/Serialization/Module.h5
-rw-r--r--include/clang/Serialization/ModuleManager.h4
3 files changed, 17 insertions, 2 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index e7bdf50ae1..6148151487 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -579,6 +579,10 @@ private:
/// \brief Whether to disable the use of stat caches in AST files.
bool DisableStatCache;
+ /// \brief The current "generation" of the module file import stack, which
+ /// indicates how many separate module file load operations have occurred.
+ unsigned CurrentGeneration;
+
/// \brief Mapping from switch-case IDs in the chain to switch-case statements
///
/// Statements usually don't have IDs, but switch cases need them, so that the
@@ -652,6 +656,9 @@ private:
/// loaded once the recursive loading has completed.
std::deque<PendingIdentifierInfo> PendingIdentifierInfos;
+ /// \brief The generation number of
+ llvm::DenseMap<IdentifierInfo *, unsigned> IdentifierGeneration;
+
/// \brief Contains declarations and definitions that will be
/// "interesting" to the ASTConsumer, when we get that AST consumer.
///
@@ -1432,6 +1439,9 @@ public:
/// \brief Update an out-of-date identifier.
virtual void updateOutOfDateIdentifier(IdentifierInfo &II);
+ /// \brief Note that this identifier is up-to-date.
+ void markIdentifierUpToDate(IdentifierInfo *II);
+
/// \brief Read the macro definition corresponding to this iterator
/// into the unread macro record offsets table.
void LoadMacroDefinition(
diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h
index ad2c98e695..831a873ac1 100644
--- a/include/clang/Serialization/Module.h
+++ b/include/clang/Serialization/Module.h
@@ -57,7 +57,7 @@ struct DeclContextInfo {
/// other modules.
class ModuleFile {
public:
- ModuleFile(ModuleKind Kind);
+ ModuleFile(ModuleKind Kind, unsigned Generation);
~ModuleFile();
// === General information ===
@@ -72,6 +72,9 @@ public:
/// user.
bool DirectlyImported;
+ /// \brief The generation of which this module file is a part.
+ unsigned Generation;
+
/// \brief The memory buffer that stores the data associated with
/// this AST file.
llvm::OwningPtr<llvm::MemoryBuffer> Buffer;
diff --git a/include/clang/Serialization/ModuleManager.h b/include/clang/Serialization/ModuleManager.h
index ac9483894d..6ff0640b64 100644
--- a/include/clang/Serialization/ModuleManager.h
+++ b/include/clang/Serialization/ModuleManager.h
@@ -95,6 +95,8 @@ public:
/// \param ImportedBy The module that is importing this module, or NULL if
/// this module is imported directly by the user.
///
+ /// \param Generation The generation in which this module was loaded.
+ ///
/// \param ErrorStr Will be set to a non-empty string if any errors occurred
/// while trying to load the module.
///
@@ -102,7 +104,7 @@ public:
/// and a boolean indicating whether the module was newly added.
std::pair<ModuleFile *, bool>
addModule(StringRef FileName, ModuleKind Type, ModuleFile *ImportedBy,
- std::string &ErrorStr);
+ unsigned Generation, std::string &ErrorStr);
/// \brief Add an in-memory buffer the list of known buffers
void addInMemoryBuffer(StringRef FileName, llvm::MemoryBuffer *Buffer);