Skip to content

Commit 0c4309b

Browse files
authored
IR: Avoid repeating assert condition in Value destructor (#136340)
1 parent 0ed1c98 commit 0c4309b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/IR/Value.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ Value::~Value() {
9898
dbgs() << "While deleting: " << *VTy << " %" << getName() << "\n";
9999
for (auto *U : users())
100100
dbgs() << "Use still stuck around after Def is destroyed:" << *U << "\n";
101+
102+
llvm_unreachable("Uses remain when a value is destroyed!");
101103
}
102104
#endif
103-
assert(materialized_use_empty() && "Uses remain when a value is destroyed!");
104105

105106
// If this value is named, destroy the name. This should not be in a symtab
106107
// at this point.

0 commit comments

Comments
 (0)