llvm-undname: Correctly demangle vararg parameters
FunctionSignatureNode already had an IsVariadic field,
but it wasn't used anywhere yet. Set it and use it.
llvm-svn: 362541
diff --git a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp
index c07fde8..63ca475 100644
--- a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp
@@ -414,6 +414,12 @@
Params->output(OS, Flags);
else
OS << "void";
+
+ if (IsVariadic) {
+ if (OS.back() != '(')
+ OS << ", ";
+ OS << "...";
+ }
OS << ")";
}