Skip to content

Commit 6ee5887

Browse files
MaskRaygithub-actions[bot]
authored andcommitted
Automerge: [Hexagon] Call MCExpr::print with valid MAI
operator<< should be avoided when operands with VariantKind are dumped. This prepares for the upcoming change that moves target-specific VariantKind printer to MCAsmInfo.
2 parents 8a0b042 + cf00ac8 commit 6ee5887

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void HexagonInstPrinter::printOperand(MCInst const *MI, unsigned OpNo,
7272
if (MO.getExpr()->evaluateAsAbsolute(Value))
7373
O << formatImm(Value);
7474
else
75-
O << *MO.getExpr();
75+
MO.getExpr()->print(O, &MAI);
7676
} else {
7777
llvm_unreachable("Unknown operand");
7878
}
@@ -90,6 +90,6 @@ void HexagonInstPrinter::printBrtarget(MCInst const *MI, unsigned OpNo,
9090
if (HasExtender || HexagonMCInstrInfo::isConstExtended(MII, *MI))
9191
if (HexagonMCInstrInfo::getExtendableOp(MII, *MI) == OpNo)
9292
O << "##";
93-
O << Expr;
93+
Expr.print(O, &MAI);
9494
}
9595
}

0 commit comments

Comments
 (0)