diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Metadata.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index da69c43..162884c 100644 --- a/lib/VMCore/Metadata.cpp +++ b/lib/VMCore/Metadata.cpp @@ -343,9 +343,7 @@ void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) { FoldingSetNodeID ID; Profile(ID); void *InsertPoint; - MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint); - - if (N) { + if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) { N->replaceAllUsesWith(this); N->destroy(); N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint); |