aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-04-11 21:13:37 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-04-11 21:13:37 +0000
commit1ac9c98e6c40d9a1e6cb904b414161388af4a89c (patch)
tree1928c119f565401a0a8d7221f85fe4f0c3190d0b /clang/lib/Serialization/ASTWriter.cpp
parentddb9ae192a0df1497eeda6e2627e82db3c85c0f0 (diff)
downloadllvm-1ac9c98e6c40d9a1e6cb904b414161388af4a89c.zip
llvm-1ac9c98e6c40d9a1e6cb904b414161388af4a89c.tar.gz
llvm-1ac9c98e6c40d9a1e6cb904b414161388af4a89c.tar.bz2
Modular Codegen: Support homing debug info for types in modular objects
Matching the function-homing support for modular codegen. Any type implicitly (implicit template specializations) or explicitly defined in a module is attached to that module's object file and omitted elsewhere (only a declaration used if necessary for references). llvm-svn: 299987
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 23859c2..ec59250 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -5770,6 +5770,12 @@ void ASTRecordWriter::AddCXXDefinitionData(const CXXRecordDecl *D) {
Record->push_back(Data.HasDeclaredCopyConstructorWithConstParam);
Record->push_back(Data.HasDeclaredCopyAssignmentWithConstParam);
Record->push_back(Data.ODRHash);
+ bool ModularCodegen = Writer->Context->getLangOpts().ModularCodegen &&
+ Writer->WritingModule && !D->isDependentType();
+ Record->push_back(ModularCodegen);
+ if (ModularCodegen)
+ Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(D));
+
// IsLambda bit is already saved.
Record->push_back(Data.NumBases);