]> granicus.if.org Git - clang/commitdiff
[modules] Don't write the UnusedFileScopedDecls vector to the module file.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Mar 2013 04:45:00 +0000 (04:45 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Mar 2013 04:45:00 +0000 (04:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177001 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTWriter.cpp

index 58a196d9a1ac7e598fcabef3ebae27634e64d90f..10a80444a26a0603f79794c4b9b90a8b48e17251 100644 (file)
@@ -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.