summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commited37856e69b90990a276f267bb00770bd1c92248 (patch)
tree331452a0215c9413eef7a53a3f36ad1cf391a250 /llvm/lib/Transforms
parentdc403c86ecdf3b0624dc3992136b9179c9d456b1 (diff)
downloadbcm5719-llvm-ed37856e69b90990a276f267bb00770bd1c92248.tar.gz
bcm5719-llvm-ed37856e69b90990a276f267bb00770bd1c92248.zip
Fix bug with last patch which would occur when a call returned void and we
attempted to assign it a name. llvm-svn: 3142
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionResolution.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
index 2306df999db..e2165c77cb7 100644
--- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/llvm/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...
//
OpenPOWER on IntegriCloud