mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
IR: Fix an inverted assertion when replacing resolved operands
Add a unit test, since this bug was only exposed by clang tests. Thanks to Rafael for tracking this down! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -444,7 +444,7 @@ void UniquableMDNode::resolveAfterOperandChange(Metadata *Old, Metadata *New) {
|
||||
|
||||
// Check if an operand was resolved.
|
||||
if (!isOperandUnresolved(Old))
|
||||
assert(isOperandUnresolved(New) && "Operand just became unresolved");
|
||||
assert(!isOperandUnresolved(New) && "Operand just became unresolved");
|
||||
else if (!isOperandUnresolved(New))
|
||||
decrementUnresolvedOperandCount();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user