r246524 - Use a more appropriate way of writing 1.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 19:02:09 PDT 2015


Author: rsmith
Date: Mon Aug 31 21:02:09 2015
New Revision: 246524

URL: http://llvm.org/viewvc/llvm-project?rev=246524&view=rev
Log:
Use a more appropriate way of writing 1.

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=246524&r1=246523&r2=246524&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Mon Aug 31 21:02:09 2015
@@ -7268,8 +7268,7 @@ unsigned ASTReader::getModuleFileID(Modu
   // 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);




More information about the cfe-commits mailing list