diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-02 17:30:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-02 17:30:13 +0000 |
commit | e37a85af65e82896b2d2ec27c6411f4033094839 (patch) | |
tree | 742c4b64f700f20e07b12a7095c191282c980320 /clang/lib/Serialization/ASTWriter.cpp | |
parent | a5bc2f877f331db59497c64729378cfff8fd8288 (diff) | |
download | bcm5719-llvm-e37a85af65e82896b2d2ec27c6411f4033094839.tar.gz bcm5719-llvm-e37a85af65e82896b2d2ec27c6411f4033094839.zip |
Notify the AST writer (via ASTDeserializationListener) when a
(sub)module is read from an AST file. This makes sure that the AST
writer knows how to map all modules to their global IDs.
llvm-svn: 145685
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 5580f90b83b..6d51dbce3e2 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4167,6 +4167,11 @@ void ASTWriter::MacroDefinitionRead(serialization::PreprocessedEntityID ID, MacroDefinitions[MD] = ID; } +void ASTWriter::ModuleRead(serialization::SubmoduleID ID, Module *Mod) { + assert(SubmoduleIDs.find(Mod) == SubmoduleIDs.end()); + SubmoduleIDs[Mod] = ID; +} + void ASTWriter::CompletedTagDefinition(const TagDecl *D) { assert(D->isCompleteDefinition()); assert(!WritingAST && "Already writing the AST!"); |