forked from OSchip/llvm-project
Do not check use_empty() before invoking replaceAllUsesWith().
Let replaceAllUsesWith() adjust VHs even though there are no uses. llvm-svn: 83978
This commit is contained in:
parent
e6f26a7415
commit
7468489deb
|
@ -1110,8 +1110,9 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
|
|||
NewCall->setCallingConv(CI->getCallingConv());
|
||||
|
||||
// Finally, remove the old call, replacing any uses with the new one.
|
||||
if (!CI->use_empty())
|
||||
CI->replaceAllUsesWith(NewCall);
|
||||
CI->replaceAllUsesWith(NewCall);
|
||||
|
||||
|
||||
CI->eraseFromParent();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue