forked from OSchip/llvm-project
Check void type before using replaceAllUsesWith().
llvm-svn: 84050
This commit is contained in:
parent
a677136900
commit
3b3f0f6b65
|
@ -1110,7 +1110,8 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
|
|||
NewCall->setCallingConv(CI->getCallingConv());
|
||||
|
||||
// Finally, remove the old call, replacing any uses with the new one.
|
||||
CI->replaceAllUsesWith(NewCall);
|
||||
if (CI->getType() != llvm::Type::getVoidTy(CI->getContext()))
|
||||
CI->replaceAllUsesWith(NewCall);
|
||||
|
||||
CI->eraseFromParent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue