Skip to content

Commit a365abd

Browse files
committed
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.
1 parent e6b2528 commit a365abd

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

llvm/include/llvm/MC/MCExpr.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ class MCExpr {
134134
MCValue &);
135135
};
136136

137-
inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) {
138-
E.print(OS, nullptr);
139-
return OS;
140-
}
141-
142137
//// Represent a constant integer expression.
143138
class MCConstantExpr : public MCExpr {
144139
int64_t Value;

llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ struct CSKYOperand : public MCParsedAsmOperand {
441441

442442
switch (Kind) {
443443
case CPOP:
444-
OS << *getConstpoolOp();
444+
MAI.printExpr(OS, *getConstpoolOp());
445445
break;
446446
case Immediate:
447-
OS << *getImm();
447+
MAI.printExpr(OS, *getImm());
448448
break;
449449
case KindTy::Register:
450450
OS << "<register " << RegName(getReg()) << ">";

0 commit comments

Comments
 (0)