From 76fd286f1a924785e148923b64d08c5cda00040b Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 19 Oct 2022 13:32:31 -0700 Subject: [PATCH] [clang] Disable assertion that can "easily happen" 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 (cherry picked from commit 97b91307b00e958bc1d511c93a8a6bef510485ac) --- clang/lib/Serialization/ASTWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index c323f50fd8b077..c7195eee397327 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -2735,12 +2735,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; }