Skip to content

Commit 4a150d6

Browse files
drblalloaleclearmind
authored andcommitted
Drop: assertion too strict for revng usecase
IRmover asserts that a two types into two modules can be pointer wise identical only if they are mapped to each other. This assumption arise from the idea that modules are usually created indipendently from each other. We cannot make that assumption because the pipeline clones and merges back modules from the same origin.
1 parent f085c9f commit 4a150d6

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

llvm/lib/Linker/IRMover.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ Type *TypeMapTy::get(Type *Ty, SmallPtrSet<StructType *, 8> &Visited) {
243243
bool IsUniqued = !isa<StructType>(Ty) || cast<StructType>(Ty)->isLiteral();
244244

245245
if (!IsUniqued) {
246-
#ifndef NDEBUG
247-
for (auto &Pair : MappedTypes) {
248-
assert(!(Pair.first != Ty && Pair.second == Ty) &&
249-
"mapping to a source type");
250-
}
251-
#endif
252-
253246
if (!Visited.insert(cast<StructType>(Ty)).second) {
254247
StructType *DTy = StructType::create(Ty->getContext());
255248
return *Entry = DTy;

0 commit comments

Comments
 (0)