summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2019-11-03 21:15:03 +0100
committerLuboš Luňák <l.lunak@centrum.cz>2020-01-15 00:01:08 +0100
commitcbc9d22e49b434b6ceb2eb94b67079d02e0a7b74 (patch)
tree4ca09fdd49b20ff9b144dc1a4229cb54396de63f /clang/lib/Serialization/ASTWriter.cpp
parentb5b2cf7af47f1ca04635dae7b787c8a81d5af4c9 (diff)
downloadbcm5719-llvm-cbc9d22e49b434b6ceb2eb94b67079d02e0a7b74.tar.gz
bcm5719-llvm-cbc9d22e49b434b6ceb2eb94b67079d02e0a7b74.zip
make -fmodules-codegen and -fmodules-debuginfo work also with PCHs
Allow to build PCH's (with -building-pch-with-obj and the extra .o file) with -fmodules-codegen -fmodules-debuginfo to allow emitting shared code into the extra .o file, similarly to how it works with modules. A bit of a misnomer, but the underlying functionality is the same. This saves up to 20% of build time here. Differential Revision: https://reviews.llvm.org/D69778
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index aebdfa90706..6eba48a1abe 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -5583,8 +5583,8 @@ void ASTRecordWriter::AddCXXDefinitionData(const CXXRecordDecl *D) {
// getODRHash will compute the ODRHash if it has not been previously computed.
Record->push_back(D->getODRHash());
- bool ModulesDebugInfo = Writer->Context->getLangOpts().ModulesDebugInfo &&
- Writer->WritingModule && !D->isDependentType();
+ bool ModulesDebugInfo =
+ Writer->Context->getLangOpts().ModulesDebugInfo && !D->isDependentType();
Record->push_back(ModulesDebugInfo);
if (ModulesDebugInfo)
Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(D));
OpenPOWER on IntegriCloud