[clang] 97b9130 - [clang] Disable assertion that can "easily happen"
Jonas Devlieghere via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 15:09:02 PDT 2022
Author: Jonas Devlieghere
Date: 2022-10-19T15:08:56-07:00
New Revision: 97b91307b00e958bc1d511c93a8a6bef510485ac
URL: https://github.com/llvm/llvm-project/commit/97b91307b00e958bc1d511c93a8a6bef510485ac
DIFF: https://github.com/llvm/llvm-project/commit/97b91307b00e958bc1d511c93a8a6bef510485ac.diff
LOG: [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
Added:
Modified:
clang/lib/Serialization/ASTWriter.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 6bfbf0b57f5b8..4dcc5ee0a1c86 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -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;
}
More information about the cfe-commits
mailing list