Allow vararg method types with 0 fixed types
authorChris Lattner <sabre@nondot.org>
Sat, 28 Jul 2001 17:52:35 +0000 (17:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Jul 2001 17:52:35 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index 9d09e2950733685b4998c394acb48ec91981d27a..8b3184e7c8c3c48d88900d1f04336537067cb58f 100644 (file)
@@ -213,7 +213,10 @@ const MethodType *MethodType::getMethodType(const Type *ReturnType,
       Name += ", ";
     Name += (*I)->getName();
   }
-  if (IsVarArg) Name += ", ...";
+  if (IsVarArg) {
+    if (Params.size() > 1) Name += ", ";
+    Name += "...";
+  }
   Name += ")";
 
 #if TEST_MERGE_TYPES