[llvm] r228244 - [MC] Remove various unused MCAsmInfo parameters.
Sean Silva
chisophugis at gmail.com
Wed Feb 4 16:58:51 PST 2015
Author: silvas
Date: Wed Feb 4 18:58:51 2015
New Revision: 228244
URL: http://llvm.org/viewvc/llvm-project?rev=228244&view=rev
Log:
[MC] Remove various unused MCAsmInfo parameters.
Modified:
llvm/trunk/include/llvm/MC/MCInst.h
llvm/trunk/include/llvm/MC/MCValue.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCInst.cpp
llvm/trunk/lib/MC/MCValue.cpp
Modified: llvm/trunk/include/llvm/MC/MCInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInst.h?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInst.h (original)
+++ llvm/trunk/include/llvm/MC/MCInst.h Wed Feb 4 18:58:51 2015
@@ -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;
}
Modified: llvm/trunk/include/llvm/MC/MCValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCValue.h?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCValue.h (original)
+++ llvm/trunk/include/llvm/MC/MCValue.h Wed Feb 4 18:58:51 2015
@@ -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;
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp Wed Feb 4 18:58:51 2015
@@ -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()), "");
}
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Feb 4 18:58:51 2015
@@ -1256,7 +1256,7 @@ void MCAsmStreamer::EmitInstruction(cons
// 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(cons
if (InstPrinter)
InstPrinter->printInst(&Inst, OS, "");
else
- Inst.print(OS, MAI);
+ Inst.print(OS);
EmitEOL();
}
Modified: llvm/trunk/lib/MC/MCInst.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCInst.cpp?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCInst.cpp (original)
+++ llvm/trunk/lib/MC/MCInst.cpp Wed Feb 4 18:58:51 2015
@@ -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
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
OS << Separator;
- getOperand(i).print(OS, MAI);
+ getOperand(i).print(OS);
}
OS << ">";
}
Modified: llvm/trunk/lib/MC/MCValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCValue.cpp?rev=228244&r1=228243&r2=228244&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCValue.cpp (original)
+++ llvm/trunk/lib/MC/MCValue.cpp Wed Feb 4 18:58:51 2015
@@ -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;
More information about the llvm-commits
mailing list