File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ enum OperandKind {
60
60
Arg,
61
61
Global,
62
62
Predicate,
63
+ OpKindBinOp,
63
64
UnimplementedOperand = 255 ,
64
65
};
65
66
@@ -330,7 +331,7 @@ class YkIRWriter {
330
331
// left-hand side:
331
332
serialiseOperand (I, VLMap, I->getOperand (0 ));
332
333
// binary operator:
333
- serialiseBinOperator (I->getOpcode ());
334
+ serialiseBinOperatorOperand (I->getOpcode ());
334
335
// right-hand side:
335
336
serialiseOperand (I, VLMap, I->getOperand (1 ));
336
337
@@ -339,7 +340,10 @@ class YkIRWriter {
339
340
}
340
341
341
342
// Serialise a binary operator.
342
- void serialiseBinOperator (Instruction::BinaryOps BO) {
343
+ void serialiseBinOperatorOperand (Instruction::BinaryOps BO) {
344
+ // operand kind:
345
+ OutStreamer.emitInt8 (OperandKind::OpKindBinOp);
346
+ // the operator:
343
347
switch (BO) {
344
348
case Instruction::BinaryOps::Add:
345
349
OutStreamer.emitInt8 (BinOp::BinOpAdd);
@@ -395,8 +399,8 @@ class YkIRWriter {
395
399
case Instruction::BinaryOps::URem:
396
400
OutStreamer.emitInt8 (BinOp::BinOpURem);
397
401
break ;
398
- case Instruction::BinaryOps::BinaryOpsEnd :
399
- break ;
402
+ default :
403
+ llvm::report_fatal_error ( " unknown binary operator " ) ;
400
404
}
401
405
}
402
406
You can’t perform that action at this time.
0 commit comments