MCExpr: Remove error-prone operator<<

Printing an expression is error-prone without a MCAsmInfo argument.
The callers have migrated to MCAsmInfo::printExpr or MCExpr::print.
This commit is contained in:
Fangrui Song
2025-06-28 14:50:28 -07:00
parent e6b25288eb
commit a365abd544
2 changed files with 2 additions and 7 deletions

View File

@@ -134,11 +134,6 @@ public:
MCValue &);
};
inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) {
E.print(OS, nullptr);
return OS;
}
//// Represent a constant integer expression.
class MCConstantExpr : public MCExpr {
int64_t Value;

View File

@@ -441,10 +441,10 @@ public:
switch (Kind) {
case CPOP:
OS << *getConstpoolOp();
MAI.printExpr(OS, *getConstpoolOp());
break;
case Immediate:
OS << *getImm();
MAI.printExpr(OS, *getImm());
break;
case KindTy::Register:
OS << "<register " << RegName(getReg()) << ">";