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
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d091157..4c8ef58 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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();
}