mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 10:30:30 +00:00
when inserting a dummy argument to work-around the CBE not supporting
zero arg vararg functions, pass undef instead of 'int 0', which is cheaper. llvm-svn: 32634
This commit is contained in:
parent
8b1e4d1edf
commit
6bdae11796
@ -499,8 +499,6 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) {
|
||||
// Work around LLVM bug PR56: the CWriter cannot emit varargs functions which
|
||||
// have zero fixed arguments.
|
||||
//
|
||||
// FIXME: once this bug is fixed in the CWriter, this hack should be removed.
|
||||
//
|
||||
bool ExtraArgHack = false;
|
||||
if (Params.empty() && FTy->isVarArg()) {
|
||||
ExtraArgHack = true;
|
||||
@ -530,7 +528,7 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) {
|
||||
Args.push_back(*AI);
|
||||
|
||||
if (ExtraArgHack)
|
||||
Args.push_back(Constant::getNullValue(Type::IntTy));
|
||||
Args.push_back(UndefValue::get(Type::IntTy));
|
||||
|
||||
// Push any varargs arguments on the list
|
||||
for (; AI != CS.arg_end(); ++AI)
|
||||
|
Loading…
x
Reference in New Issue
Block a user