]> granicus.if.org Git - clang/commitdiff
unbreak test/CodeGen/builtins.c, reverting Devang's change.
authorChris Lattner <sabre@nondot.org>
Wed, 14 Oct 2009 05:49:21 +0000 (05:49 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Oct 2009 05:49:21 +0000 (05:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84075 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index d091157f87751c4581cc2dc335fc42c2988cab8e..4c8ef5836770906775c5dd8e5fe3795a7158fbdc 100644 (file)
@@ -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();
   }