From 391c5d231a1d251ea9dc3d8745547c957db94ca4 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Wed, 30 Nov 2005 18:54:35 +0000 Subject: No longer track value types for asm printer operands, and remove them as an argument to every operand printing function. Requires some slight tweaks to x86, the only user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24541 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmWriterEmitter.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'utils/TableGen/AsmWriterEmitter.cpp') diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index eeabd8a089..cc59aa105a 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -38,21 +38,16 @@ namespace { /// machine instruction. unsigned MIOpNo; - /// OpVT - For isMachineInstrOperand, this is the value type for the - /// operand. - MVT::ValueType OpVT; - AsmWriterOperand(const std::string &LitStr) - : OperandType(isLiteralTextOperand), Str(LitStr) {} + : OperandType(isLiteralTextOperand), Str(LitStr) {} - AsmWriterOperand(const std::string &Printer, unsigned OpNo, - MVT::ValueType VT) : OperandType(isMachineInstrOperand), - Str(Printer), MIOpNo(OpNo), OpVT(VT){} + AsmWriterOperand(const std::string &Printer, unsigned OpNo) + : OperandType(isMachineInstrOperand), Str(Printer), MIOpNo(OpNo) {} bool operator!=(const AsmWriterOperand &Other) const { if (OperandType != Other.OperandType || Str != Other.Str) return true; if (OperandType == isMachineInstrOperand) - return MIOpNo != Other.MIOpNo || OpVT != Other.OpVT; + return MIOpNo != Other.MIOpNo; return false; } bool operator==(const AsmWriterOperand &Other) const { @@ -90,7 +85,7 @@ void AsmWriterOperand::EmitCode(std::ostream &OS) const { if (OperandType == isLiteralTextOperand) OS << "O << \"" << Str << "\"; "; else - OS << Str << "(MI, " << MIOpNo << ", MVT::" << getEnumName(OpVT) << "); "; + OS << Str << "(MI, " << MIOpNo << "); "; } @@ -204,8 +199,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant) { --MIOp; } - Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, - MIOp, OpInfo.Ty)); + Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, MIOp)); LastEmitted = VarEnd; } } -- cgit v1.2.3