We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ef74f10 + 615359a commit ed6292bCopy full SHA for ed6292b
llvm/lib/YkIR/YkIRWriter.cpp
@@ -418,16 +418,15 @@ class YkIRWriter {
418
// opcode:
419
serialiseOpcode(OpCode::Call);
420
// num_operands:
421
- unsigned NumOpers = I->getNumOperands();
422
- OutStreamer.emitInt32(NumOpers);
+ OutStreamer.emitInt32(I->arg_size() + 1); // +1 for callee operand.
423
424
// OPERAND 0: What to call.
425
//
426
// In LLVM IR this is the final operand, which is a cause of confusion.
427
- serialiseOperand(I, VLMap, I->getOperand(NumOpers - 1));
+ serialiseOperand(I, VLMap, I->getCalledOperand());
428
429
// Now the rest of the operands.
430
- for (unsigned OI = 0; OI < NumOpers - 1; OI++) {
+ for (unsigned OI = 0; OI < I->arg_size(); OI++) {
431
serialiseOperand(I, VLMap, I->getOperand(OI));
432
}
433
0 commit comments