summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-03-22 09:11:00 +0000
committerGabor Greif <ggreif@gmail.com>2010-03-22 09:11:00 +0000
commite1517a084f56cd23dd4a64338e0865f53e978d9b (patch)
tree4e12a84b1a2fa11406d3f67c8884647983d532fb /llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
parent7a743e15e31701db08f2092538ed2d5dfabe0cdb (diff)
downloadbcm5719-llvm-e1517a084f56cd23dd4a64338e0865f53e978d9b.tar.gz
bcm5719-llvm-e1517a084f56cd23dd4a64338e0865f53e978d9b.zip
backing out r99170 because it still fails on clang-x86_64-darwin10-fnt
llvm-svn: 99171
Diffstat (limited to 'llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index ca397e54259..f386ed78b5f 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -352,14 +352,14 @@ DAE::Liveness DAE::SurveyUse(Value::use_iterator U, UseVector &MaybeLiveUses,
// argument, since if it was the function argument this would be an
// indirect call and the we know can't be looking at a value of the
// label type (for the invoke instruction).
- unsigned ArgNo = CS.getArgumentNo(U);
+ unsigned ArgNo = CS.getArgumentNo(U.getOperandNo());
if (ArgNo >= F->getFunctionType()->getNumParams())
// The value is passed in through a vararg! Must be live.
return Live;
- assert(CS.getArgument(ArgNo)
- == CS.getInstruction()->getOperand(U.getOperandNo())
+ assert(CS.getArgument(ArgNo)
+ == CS.getInstruction()->getOperand(U.getOperandNo())
&& "Argument is not where we expected it");
// Value passed to a normal call. It's only live when the corresponding
OpenPOWER on IntegriCloud