diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-20 03:59:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-20 03:59:18 +0000 |
commit | 970e441671be130c9a12b7eda2a0b795008812a5 (patch) | |
tree | fac8ef40951d213d39f66480e67c054d4710cb8c /lib/Serialization/ASTReader.cpp | |
parent | 576f32c5e1f3ac5555ea20bb9effce2d59ad2fa9 (diff) |
Make sure that Module::ConfigMacrosExhaustive gets initialized and deserialized correctly.
This fixes regressions introduced in r177466 that caused several
module tests to fail sporadically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 00e5ce910b..126770b5b8 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3475,7 +3475,7 @@ bool ASTReader::ReadSubmoduleBlock(ModuleFile &F) { return true; } - if (Record.size() < 7) { + if (Record.size() < 8) { Error("malformed module definition"); return true; } @@ -3489,7 +3489,8 @@ bool ASTReader::ReadSubmoduleBlock(ModuleFile &F) { bool InferSubmodules = Record[5]; bool InferExplicitSubmodules = Record[6]; bool InferExportWildcard = Record[7]; - + bool ConfigMacrosExhaustive = Record[8]; + Module *ParentModule = 0; if (Parent) ParentModule = getSubmodule(Parent); @@ -3527,13 +3528,15 @@ bool ASTReader::ReadSubmoduleBlock(ModuleFile &F) { CurrentModule->InferSubmodules = InferSubmodules; CurrentModule->InferExplicitSubmodules = InferExplicitSubmodules; CurrentModule->InferExportWildcard = InferExportWildcard; + CurrentModule->ConfigMacrosExhaustive = ConfigMacrosExhaustive; if (DeserializationListener) DeserializationListener->ModuleRead(GlobalID, CurrentModule); SubmodulesLoaded[GlobalIndex] = CurrentModule; - // Clear out link libraries; the module file has them. + // Clear out link libraries and config macros; the module file has them. CurrentModule->LinkLibraries.clear(); + CurrentModule->ConfigMacros.clear(); break; } |