aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index b3b5b40e24..eeb2bdd4f3 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -941,6 +941,8 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) {
if (FT->isVarArg() && !FT->getParamTypes().empty()) {
if (FT->getParamTypes().size()) FunctionInnards << ", ";
FunctionInnards << "..."; // Output varargs portion of signature!
+ } else if (!FT->isVarArg() && FT->getParamTypes().empty()) {
+ FunctionInnards << "void"; // ret() -> ret(void) in C.
}
FunctionInnards << ")";
// Print out the return type and the entire signature for that matter