[cfe-commits] r84050 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Devang Patel
dpatel at apple.com
Tue Oct 13 15:59:12 PDT 2009
Author: dpatel
Date: Tue Oct 13 17:59:11 2009
New Revision: 84050
URL: http://llvm.org/viewvc/llvm-project?rev=84050&view=rev
Log:
Check void type before using replaceAllUsesWith().
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=84050&r1=84049&r2=84050&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Oct 13 17:59:11 2009
@@ -1110,7 +1110,8 @@
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();
}
More information about the cfe-commits
mailing list