[clang] Disable assertion that can "easily happen"
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 19 Oct 2022 20:32:31 +0000 (13:32 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 19 Oct 2022 22:08:56 +0000 (15:08 -0700)
Disable the assertion for getting a module ID for non-local,
non-imported module. According to the FIXME this can "easily happen" and
indeed, we're hitting this assertion regularly. Disable it until it can
be properly investigated.

rdar://99352728

Differential revision: https://reviews.llvm.org/D136290

clang/lib/Serialization/ASTWriter.cpp

index 6bfbf0b..4dcc5ee 100644 (file)
@@ -2669,12 +2669,12 @@ unsigned ASTWriter::getLocalOrImportedSubmoduleID(const Module *Mod) {
 }
 
 unsigned ASTWriter::getSubmoduleID(Module *Mod) {
+  unsigned ID = getLocalOrImportedSubmoduleID(Mod);
   // FIXME: This can easily happen, if we have a reference to a submodule that
   // did not result in us loading a module file for that submodule. For
   // instance, a cross-top-level-module 'conflict' declaration will hit this.
-  unsigned ID = getLocalOrImportedSubmoduleID(Mod);
-  assert((ID || !Mod) &&
-         "asked for module ID for non-local, non-imported module");
+  // assert((ID || !Mod) &&
+  //        "asked for module ID for non-local, non-imported module");
   return ID;
 }