Arguments are counting from 1. not from 0. Maybe we should change
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 28 Jan 2007 18:01:49 +0000 (18:01 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 28 Jan 2007 18:01:49 +0000 (18:01 +0000)
numbering somehow? E.g. make return argument the last?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33606 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 47dc05af51092c71419fcf719b0e14a9569c9833..df7440f792f037fdb4182fa9f22b20dad3d4cdef 100644 (file)
@@ -2874,7 +2874,7 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
 
   // Add one result value for each formal argument.
   std::vector<MVT::ValueType> RetVals;
-  unsigned j = 0;
+  unsigned j = 1;
   for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end();
        I != E; ++I, ++j) {
     MVT::ValueType VT = getValueType(I->getType());