Removed unused argument.
authorChad Rosier <mcrosier@apple.com>
Mon, 3 Sep 2012 03:16:09 +0000 (03:16 +0000)
committerChad Rosier <mcrosier@apple.com>
Mon, 3 Sep 2012 03:16:09 +0000 (03:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163104 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCTargetAsmParser.h
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
lib/Target/X86/AsmParser/X86AsmParser.cpp
utils/TableGen/AsmMatcherEmitter.cpp

index 40daab888cbe0c929ae32151cba2656875a1dc56..35c4acd5d2d1463246021cb7255248c9e3ac3152 100644 (file)
@@ -85,7 +85,7 @@ public:
   /// On failure, the target parser is responsible for emitting a diagnostic
   /// explaining the match failure.
   virtual bool
-  MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
+  MatchInstruction(SMLoc IDLoc, unsigned &Kind,
                    SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                    SmallVectorImpl<MCInst> &MCInsts,
                    unsigned &OrigErrorInfo,
index ebb0f8d8de591521c3113b86a6da29c9177d690f..fe11bec93fc95eca3acb2d62bc84463c40edf715 100644 (file)
@@ -7457,11 +7457,10 @@ MatchAndEmitInstruction(SMLoc IDLoc,
                         MCStreamer &Out) {
   MCInst Inst;
   unsigned Kind;
-  unsigned Opcode;
   unsigned ErrorInfo;
   unsigned MatchResult;
 
-  MatchResult = MatchInstructionImpl(Operands, Kind, Opcode, Inst, ErrorInfo);
+  MatchResult = MatchInstructionImpl(Operands, Kind, Inst, ErrorInfo);
   switch (MatchResult) {
   default: break;
   case Match_Success:
index 9e6d397d45f4d38b7a5b4f9549d540117d9c70a1..f9796a641ce8b9d84b989adf09df632a7f8221ff 100644 (file)
@@ -318,10 +318,9 @@ MatchAndEmitInstruction(SMLoc IDLoc,
                         MCStreamer &Out) {
   MCInst Inst;
   unsigned Kind;
-  unsigned Opcode;
   unsigned ErrorInfo;
 
-  switch (MatchInstructionImpl(Operands, Kind, Opcode, Inst, ErrorInfo)) {
+  switch (MatchInstructionImpl(Operands, Kind, Inst, ErrorInfo)) {
   default: break;
   case Match_Success:
     Out.EmitInstruction(Inst);
index 1917721194538953158a0b3964c3ba93ff9311ac..3a1aa415415a20d920d5d4ba062153c30c0c6874 100644 (file)
@@ -67,7 +67,7 @@ private:
                                SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                                MCStreamer &Out);
 
-  bool MatchInstruction(SMLoc IDLoc,  unsigned &Kind, unsigned &Opcode,
+  bool MatchInstruction(SMLoc IDLoc,  unsigned &Kind,
                         SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                         SmallVectorImpl<MCInst> &MCInsts,
                         unsigned &OrigErrorInfo,
@@ -1517,11 +1517,10 @@ MatchAndEmitInstruction(SMLoc IDLoc,
                         SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                         MCStreamer &Out) {
   unsigned Kind;
-  unsigned Opcode;
   unsigned ErrorInfo;
   SmallVector<MCInst, 2> Insts;
 
-  bool Error = MatchInstruction(IDLoc, Kind, Opcode, Operands, Insts,
+  bool Error = MatchInstruction(IDLoc, Kind, Operands, Insts,
                                 ErrorInfo);
   if (!Error)
     for (unsigned i = 0, e = Insts.size(); i != e; ++i)
@@ -1530,7 +1529,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
 }
 
 bool X86AsmParser::
-MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
+MatchInstruction(SMLoc IDLoc, unsigned &Kind,
                  SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                  SmallVectorImpl<MCInst> &MCInsts, unsigned &OrigErrorInfo,
                  bool matchingInlineAsm) {
@@ -1572,7 +1571,7 @@ MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
   MCInst Inst;
 
   // First, try a direct match.
-  switch (MatchInstructionImpl(Operands, Kind, Opcode, Inst, OrigErrorInfo,
+  switch (MatchInstructionImpl(Operands, Kind, Inst, OrigErrorInfo,
                                isParsingIntelSyntax())) {
   default: break;
   case Match_Success:
@@ -1620,19 +1619,19 @@ MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
   Tmp[Base.size()] = Suffixes[0];
   unsigned ErrorInfoIgnore;
   unsigned Match1, Match2, Match3, Match4;
-  unsigned tKind, tOpcode;
+  unsigned tKind;
 
-  Match1 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
-  if (Match1 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
+  Match1 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
+  if (Match1 == Match_Success) Kind = tKind;
   Tmp[Base.size()] = Suffixes[1];
-  Match2 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
-  if (Match2 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
+  Match2 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
+  if (Match2 == Match_Success) Kind = tKind;
   Tmp[Base.size()] = Suffixes[2];
-  Match3 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
-  if (Match3 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
+  Match3 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
+  if (Match3 == Match_Success) Kind = tKind;
   Tmp[Base.size()] = Suffixes[3];
-  Match4 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
-  if (Match4 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
+  Match4 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
+  if (Match4 == Match_Success) Kind = tKind;
 
   // Restore the old token.
   Op->setTokenValue(Base);
index 32c0f2e4d44e69351116e4b79589db128a10b97d..86c90db92e1cc918cedcf0f94d5411d8d4f13f79 100644 (file)
@@ -2587,8 +2587,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
   OS << "  bool MnemonicIsValid(StringRef Mnemonic);\n";
   OS << "  unsigned MatchInstructionImpl(\n"
      << "    const SmallVectorImpl<MCParsedAsmOperand*> &Operands,\n"
-     << "    unsigned &Kind, unsigned &Opcode, MCInst &Inst, "
-     << "unsigned &ErrorInfo,\n unsigned VariantID = 0);\n";
+     << "    unsigned &Kind, MCInst &Inst, "
+     << "unsigned &ErrorInfo,\n    unsigned VariantID = 0);\n";
 
   if (Info.OperandMatchInfo.size()) {
     OS << "\n  enum OperandMatchResultTy {\n";
@@ -2768,8 +2768,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
      << Target.getName() << ClassName << "::\n"
      << "MatchInstructionImpl(const SmallVectorImpl<MCParsedAsmOperand*>"
      << " &Operands,\n";
-  OS << "                     unsigned &Kind, unsigned &Opcode, MCInst &Inst,";
-  OS << "\n                     unsigned &ErrorInfo, unsigned VariantID) {\n";
+  OS << "                     unsigned &Kind, MCInst &Inst, unsigned ";
+  OS << "&ErrorInfo,\n                     unsigned VariantID) {\n";
 
   OS << "  // Eliminate obvious mismatches.\n";
   OS << "  if (Operands.size() > " << (MaxNumOperands+1) << ") {\n";
@@ -2887,7 +2887,6 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
     OS << "    " << InsnCleanupFn << "(Inst);\n";
 
   OS << "    Kind = it->ConvertFn;\n";
-  OS << "    Opcode = it->Opcode;\n";
   OS << "    return Match_Success;\n";
   OS << "  }\n\n";