aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/FunctionResolution.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-30 02:42:49 +0000
committerChris Lattner <sabre@nondot.org>2002-07-30 02:42:49 +0000
commite902bda4ce1e56343a1c82feb591d3cd03adb44b (patch)
tree9e71ba1d7db9017e521327c238ce063c83d7aa89 /lib/Transforms/IPO/FunctionResolution.cpp
parent853f9bee444876fb5221c967ce7f623e513708af (diff)
Fix bug with last patch which would occur when a call returned void and we
attempted to assign it a name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionResolution.cpp')
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp
index 2306df999d..e2165c77cb 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -81,7 +81,8 @@ static void ConvertCallTo(CallInst *CI, Function *Dest) {
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...
//