In C, a prototype with no arguments is varargs. A prototype that takes void
has zero args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6172
91177308-0d34-0410-b5e6-
96231b3b80d8
}
if (MTy->isVarArg()) {
if (!MTy->getParamTypes().empty())
- FunctionInards << ", ";
- FunctionInards << "...";
+ FunctionInards << ", ...";
+ } else if (MTy->getParamTypes().empty()) {
+ FunctionInards << "void";
}
FunctionInards << ")";
std::string tstr = FunctionInards.str();
}
if (MTy->isVarArg()) {
if (!MTy->getParamTypes().empty())
- FunctionInards << ", ";
- FunctionInards << "...";
+ FunctionInards << ", ...";
+ } else if (MTy->getParamTypes().empty()) {
+ FunctionInards << "void";
}
FunctionInards << ")";
std::string tstr = FunctionInards.str();