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 {
418
418
// opcode:
419
419
serialiseOpcode (OpCode::Call);
420
420
// num_operands:
421
- unsigned NumOpers = I->getNumOperands ();
422
- OutStreamer.emitInt32 (NumOpers);
421
+ OutStreamer.emitInt32 (I->arg_size () + 1 ); // +1 for callee operand.
423
422
424
423
// OPERAND 0: What to call.
425
424
//
426
425
// 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 ( ));
428
427
429
428
// 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++) {
431
430
serialiseOperand (I, VLMap, I->getOperand (OI));
432
431
}
433
432
You can’t perform that action at this time.
0 commit comments