Correctly mangle variadic functions that don't have any other parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105311 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 4d98dee..fa42b63 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -1143,7 +1143,8 @@
if (MangleReturnType)
mangleType(Proto->getResultType());
- if (Proto->getNumArgs() == 0) {
+ if (Proto->getNumArgs() == 0 && !Proto->isVariadic()) {
+ // <builtin-type> ::= v # void
Out << 'v';
return;
}