aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-14 05:49:21 +0000
committerChris Lattner <sabre@nondot.org>2009-10-14 05:49:21 +0000
commit00549fcec0490b2daf27543e532f94adbb186063 (patch)
treecb9dd90f717c22ef89a3985dc94c3fdc6437862d
parent092a9a94b7adc8fb5ffa6ba11f27433a420d2983 (diff)
unbreak test/CodeGen/builtins.c, reverting Devang's change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84075 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d091157f87..4c8ef58367 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1110,8 +1110,8 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
NewCall->setCallingConv(CI->getCallingConv());
// Finally, remove the old call, replacing any uses with the new one.
- if (CI->getType() != llvm::Type::getVoidTy(CI->getContext()))
- CI->replaceAllUsesWith(NewCall);
+ if (!CI->use_empty())
+ CI->replaceAllUsesWith(NewCall);
CI->eraseFromParent();
}