diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 8a54d9e1633..23d18540e82 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -2126,7 +2126,7 @@ static bool isRequiredDecl(const Decl *D, ASTContext &Context, // ImportDecl is used by codegen to determine the set of imported modules to // search for inputs for automatic linking; include it if it has a semantic // effect. - if (isa<ImportDecl>(D)) + if (isa<ImportDecl>(D) && !WritingModule) return true; return Context.DeclMustBeEmitted(D); |