mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
[MC] Remove various unused MCAsmInfo parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228244 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09b44e9be7
commit
a875e3d4d6
include/llvm/MC
lib
@ -139,7 +139,7 @@ public:
|
||||
return Op;
|
||||
}
|
||||
|
||||
void print(raw_ostream &OS, const MCAsmInfo *MAI) const;
|
||||
void print(raw_ostream &OS) const;
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
@ -181,24 +181,23 @@ public:
|
||||
return Operands.insert(I, Op);
|
||||
}
|
||||
|
||||
void print(raw_ostream &OS, const MCAsmInfo *MAI) const;
|
||||
void print(raw_ostream &OS) const;
|
||||
void dump() const;
|
||||
|
||||
/// \brief Dump the MCInst as prettily as possible using the additional MC
|
||||
/// structures, if given. Operators are separated by the \p Separator
|
||||
/// string.
|
||||
void dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI = nullptr,
|
||||
const MCInstPrinter *Printer = nullptr,
|
||||
void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer = nullptr,
|
||||
StringRef Separator = " ") const;
|
||||
};
|
||||
|
||||
inline raw_ostream& operator<<(raw_ostream &OS, const MCOperand &MO) {
|
||||
MO.print(OS, nullptr);
|
||||
MO.print(OS);
|
||||
return OS;
|
||||
}
|
||||
|
||||
inline raw_ostream& operator<<(raw_ostream &OS, const MCInst &MI) {
|
||||
MI.print(OS, nullptr);
|
||||
MI.print(OS);
|
||||
return OS;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
bool isAbsolute() const { return !SymA && !SymB; }
|
||||
|
||||
/// print - Print the value to the stream \p OS.
|
||||
void print(raw_ostream &OS, const MCAsmInfo *MAI) const;
|
||||
void print(raw_ostream &OS) const;
|
||||
|
||||
/// dump - Print the value to stderr.
|
||||
void dump() const;
|
||||
|
@ -260,9 +260,7 @@ private:
|
||||
<< "'. Instruction has only "
|
||||
<< format("%i", Inst.getNumOperands())
|
||||
<< " operands.\nInstruction is:\n ";
|
||||
Inst.dump_pretty(ErrMsgStream,
|
||||
Checker.Disassembler->getContext().getAsmInfo(),
|
||||
Checker.InstPrinter);
|
||||
Inst.dump_pretty(ErrMsgStream, Checker.InstPrinter);
|
||||
return std::make_pair(EvalResult(ErrMsgStream.str()), "");
|
||||
}
|
||||
|
||||
@ -272,9 +270,7 @@ private:
|
||||
raw_string_ostream ErrMsgStream(ErrMsg);
|
||||
ErrMsgStream << "Operand '" << format("%i", OpIdx) << "' of instruction '"
|
||||
<< Symbol << "' is not an immediate.\nInstruction is:\n ";
|
||||
Inst.dump_pretty(ErrMsgStream,
|
||||
Checker.Disassembler->getContext().getAsmInfo(),
|
||||
Checker.InstPrinter);
|
||||
Inst.dump_pretty(ErrMsgStream, Checker.InstPrinter);
|
||||
|
||||
return std::make_pair(EvalResult(ErrMsgStream.str()), "");
|
||||
}
|
||||
|
@ -1256,7 +1256,7 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &S
|
||||
|
||||
// Show the MCInst if enabled.
|
||||
if (ShowInst) {
|
||||
Inst.dump_pretty(GetCommentOS(), MAI, InstPrinter.get(), "\n ");
|
||||
Inst.dump_pretty(GetCommentOS(), InstPrinter.get(), "\n ");
|
||||
GetCommentOS() << "\n";
|
||||
}
|
||||
|
||||
@ -1264,7 +1264,7 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &S
|
||||
if (InstPrinter)
|
||||
InstPrinter->printInst(&Inst, OS, "");
|
||||
else
|
||||
Inst.print(OS, MAI);
|
||||
Inst.print(OS);
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||
void MCOperand::print(raw_ostream &OS) const {
|
||||
OS << "<MCOperand ";
|
||||
if (!isValid())
|
||||
OS << "INVALID";
|
||||
@ -39,17 +39,16 @@ void MCOperand::dump() const {
|
||||
}
|
||||
#endif
|
||||
|
||||
void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||
void MCInst::print(raw_ostream &OS) const {
|
||||
OS << "<MCInst " << getOpcode();
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
OS << " ";
|
||||
getOperand(i).print(OS, MAI);
|
||||
getOperand(i).print(OS);
|
||||
}
|
||||
OS << ">";
|
||||
}
|
||||
|
||||
void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
|
||||
const MCInstPrinter *Printer,
|
||||
void MCInst::dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer,
|
||||
StringRef Separator) const {
|
||||
OS << "<MCInst #" << getOpcode();
|
||||
|
||||
@ -59,7 +58,7 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
|
||||
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
OS << Separator;
|
||||
getOperand(i).print(OS, MAI);
|
||||
getOperand(i).print(OS);
|
||||
}
|
||||
OS << ">";
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
|
||||
void MCValue::print(raw_ostream &OS) const {
|
||||
if (isAbsolute()) {
|
||||
OS << getConstant();
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user