aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-31 21:28:19 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-31 21:28:19 +0000
commit4d9230107591dc1f8e9cc3a6edfd4d3e16c6c497 (patch)
tree423243ae66076234c5b37c59cc9e1c2214a78a59 /clang/lib/Lex/ModuleMap.cpp
parent5a473d230d047111706f6a550004a0600c7e4e32 (diff)
downloadllvm-4d9230107591dc1f8e9cc3a6edfd4d3e16c6c497.zip
llvm-4d9230107591dc1f8e9cc3a6edfd4d3e16c6c497.tar.gz
llvm-4d9230107591dc1f8e9cc3a6edfd4d3e16c6c497.tar.bz2
Fix modules codegen to be compatible with modules-ts
The Module::WithCodegen flag was only being set when the module was parsed from a ModuleMap. Instead set it late, in the ASTWriter to match the layer where the MODULAR_CODEGEN_DECLs list is determined (the WithCodegen flag essentially means "are this module's decls in MODULAR_CODEGEN_DECLs"). When simultaneous emission of AST file and modular object is implemented this may need to change - the Module::WithCodegen flag will need to be set earlier, and ideally the MODULAR_CODEGEN_DECLs gathering will consult this flag (that's not possible right now since Decls destined for an AST File don't have a Module - only if they're /read/ from a Module is that true - I expect that would need to change as well). llvm-svn: 293692
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 1db5bec..384e570 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -1501,7 +1501,6 @@ void ModuleMapParser::parseModuleDecl() {
(!ActiveModule->Parent && ModuleName == "Darwin"))
ActiveModule->NoUndeclaredIncludes = true;
ActiveModule->Directory = Directory;
- ActiveModule->WithCodegen = L.getLangOpts().ModularCodegen;
if (!ActiveModule->Parent) {
StringRef MapFileName(ModuleMapFile->getName());