summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-16 21:21:53 +0000
committerChris Lattner <sabre@nondot.org>2006-12-16 21:21:53 +0000
commitfd5f03ec3f54ad004a42cbcc1ff9e693536a1aa9 (patch)
treea6b2083095e48926176edd176a506cccbcce947e /llvm
parent9bd5ed636c4a6583d644d0323d65e5bee8de5269 (diff)
downloadbcm5719-llvm-fd5f03ec3f54ad004a42cbcc1ff9e693536a1aa9.tar.gz
bcm5719-llvm-fd5f03ec3f54ad004a42cbcc1ff9e693536a1aa9.zip
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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index d3326ac71f8..dbcc5018906 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -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)
OpenPOWER on IntegriCloud