diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
| -rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 58a196d9a1a..10a80444a26 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3531,8 +3531,9 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, // Build a record containing all of the file scoped decls in this file. RecordData UnusedFileScopedDecls; - AddLazyVectorDecls(*this, SemaRef.UnusedFileScopedDecls, - UnusedFileScopedDecls); + if (!isModule) + AddLazyVectorDecls(*this, SemaRef.UnusedFileScopedDecls, + UnusedFileScopedDecls); // Build a record containing all of the delegating constructors we still need // to resolve. |

