aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
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
commit95ca3a453ad0a86c77ba44ba48f019f1c5d8e960 (patch)
tree740ad7bd39e40fda3de5d81a035a351975598909 /lib/Transforms
parent36d439666c9f9f781d57dc2fd6d3cc80602fe095 (diff)
downloadexternal_llvm-95ca3a453ad0a86c77ba44ba48f019f1c5d8e960.tar.gz
external_llvm-95ca3a453ad0a86c77ba44ba48f019f1c5d8e960.tar.bz2
external_llvm-95ca3a453ad0a86c77ba44ba48f019f1c5d8e960.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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index d3326ac71f..dbcc501890 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/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)