summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Serialization/ASTReader.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 7c83641256a..1d692c8d7f4 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -7268,8 +7268,7 @@ unsigned ASTReader::getModuleFileID(ModuleFile *F) {
// files loaded beforehand will be the same on reload.
// FIXME: Is this true even if we have an explicit module file and a PCH?
if (F->isModule())
- // FIXME: BaseSubmoduleID appears to be off by one.
- return ((F->BaseSubmoduleID + 1) << 1) | 1;
+ return ((F->BaseSubmoduleID + NUM_PREDEF_SUBMODULE_IDS) << 1) | 1;
auto PCHModules = getModuleManager().pch_modules();
auto I = std::find(PCHModules.begin(), PCHModules.end(), F);
OpenPOWER on IntegriCloud