diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-13 00:10:38 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-13 00:10:38 +0000 |
commit | e4c842f8163022324ad2372904c6ad9ac250a963 (patch) | |
tree | 3a3b3e456cf830f3069e14fe78f8c4d3870a05a2 /llvm/lib/IR/Metadata.cpp | |
parent | 427e1214b44b6fb3110119db7d9d3018eecb770f (diff) | |
download | bcm5719-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.cpp | 2 |
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(); } |