forked from OSchip/llvm-project
Scope a varible inside an if statement, to make it clear that
it's not used afterwards. llvm-svn: 114986
This commit is contained in:
parent
11c024bbeb
commit
1a450c61f3
|
@ -343,9 +343,7 @@ void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) {
|
||||||
FoldingSetNodeID ID;
|
FoldingSetNodeID ID;
|
||||||
Profile(ID);
|
Profile(ID);
|
||||||
void *InsertPoint;
|
void *InsertPoint;
|
||||||
MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) {
|
||||||
|
|
||||||
if (N) {
|
|
||||||
N->replaceAllUsesWith(this);
|
N->replaceAllUsesWith(this);
|
||||||
N->destroy();
|
N->destroy();
|
||||||
N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
|
||||||
|
|
Loading…
Reference in New Issue