Fix bug with last patch which would occur when a call returned void and we
attempted to assign it a name.
llvm-svn: 3142
diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
index 2306df9..e2165c7 100644
--- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
@@ -81,7 +81,8 @@
BB->getInstList().remove(BBI);
// Transfer the name over...
- NewCall->setName(CI->getName());
+ if (NewCall->getType() != Type::VoidTy)
+ NewCall->setName(CI->getName());
// Replace uses of the old instruction with the appropriate values...
//