File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -418,16 +418,15 @@ class YkIRWriter {
418418 // opcode:
419419 serialiseOpcode (OpCode::Call);
420420 // num_operands:
421- unsigned NumOpers = I->getNumOperands ();
422- OutStreamer.emitInt32 (NumOpers);
421+ OutStreamer.emitInt32 (I->arg_size () + 1 ); // +1 for callee operand.
423422
424423 // OPERAND 0: What to call.
425424 //
426425 // In LLVM IR this is the final operand, which is a cause of confusion.
427- serialiseOperand (I, VLMap, I->getOperand (NumOpers - 1 ));
426+ serialiseOperand (I, VLMap, I->getCalledOperand ( ));
428427
429428 // Now the rest of the operands.
430- for (unsigned OI = 0 ; OI < NumOpers - 1 ; OI++) {
429+ for (unsigned OI = 0 ; OI < I-> arg_size () ; OI++) {
431430 serialiseOperand (I, VLMap, I->getOperand (OI));
432431 }
433432
You can’t perform that action at this time.
0 commit comments