mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 17:42:40 +00:00
Fix bug: CBackend/2003-05-13-VarArgFunction.ll
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
This commit is contained in:
parent
f3b467c243
commit
ddfc03c8cb
@ -218,8 +218,9 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
|
||||
}
|
||||
if (MTy->isVarArg()) {
|
||||
if (!MTy->getParamTypes().empty())
|
||||
FunctionInards << ", ";
|
||||
FunctionInards << "...";
|
||||
FunctionInards << ", ...";
|
||||
} else if (MTy->getParamTypes().empty()) {
|
||||
FunctionInards << "void";
|
||||
}
|
||||
FunctionInards << ")";
|
||||
std::string tstr = FunctionInards.str();
|
||||
|
@ -218,8 +218,9 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
|
||||
}
|
||||
if (MTy->isVarArg()) {
|
||||
if (!MTy->getParamTypes().empty())
|
||||
FunctionInards << ", ";
|
||||
FunctionInards << "...";
|
||||
FunctionInards << ", ...";
|
||||
} else if (MTy->getParamTypes().empty()) {
|
||||
FunctionInards << "void";
|
||||
}
|
||||
FunctionInards << ")";
|
||||
std::string tstr = FunctionInards.str();
|
||||
|
Loading…
x
Reference in New Issue
Block a user