From 734351d21429f9e8b411bed4b7d169ebad0b49df Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Oct 2009 05:49:21 +0000 Subject: unbreak test/CodeGen/builtins.c, reverting Devang's change. llvm-svn: 84075 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d091157f8..4c8ef58 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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(); } -- cgit v1.1