summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Metadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-13 00:10:38 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-13 00:10:38 +0000
commite4c842f8163022324ad2372904c6ad9ac250a963 (patch)
tree3a3b3e456cf830f3069e14fe78f8c4d3870a05a2 /llvm/lib/IR/Metadata.cpp
parent427e1214b44b6fb3110119db7d9d3018eecb770f (diff)
downloadbcm5719-llvm-e4c842f8163022324ad2372904c6ad9ac250a963.tar.gz
bcm5719-llvm-e4c842f8163022324ad2372904c6ad9ac250a963.zip
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! llvm-svn: 225738
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r--llvm/lib/IR/Metadata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 13844313925..0132bab82c6 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -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();
}
OpenPOWER on IntegriCloud