Modular Codegen: Separate flags for function and debug info support
This allows using and testing these two features separately. (noteably,
debug info is, so far as I know, always a win (basically). But function
modular codegen is currently a loss for highly optimized code - where
most of the linkonce_odr definitions are optimized away, so providing
weak_odr definitions is only overhead)
llvm-svn: 300104
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 8196c8d..812cd9e 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -2228,10 +2228,10 @@
Writer->ClearSwitchCaseIDs();
assert(FD->doesThisDeclarationHaveABody());
- bool ModularCodegen = Writer->Context->getLangOpts().ModularCodegen &&
+ bool ModulesCodegen = Writer->Context->getLangOpts().ModulesCodegen &&
Writer->WritingModule && !FD->isDependentContext();
- Record->push_back(ModularCodegen);
- if (ModularCodegen)
+ Record->push_back(ModulesCodegen);
+ if (ModulesCodegen)
Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(FD));
if (auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
Record->push_back(CD->getNumCtorInitializers());