unbreak test/CodeGen/builtins.c, reverting Devang's change.
llvm-svn: 84075
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index d091157..4c8ef58 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1110,8 +1110,8 @@
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();
}