[llvm] r256544 - De-virtualize mnemonicIsValid and remove from the base class. It's not called by any common code.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 28 23:43:04 PST 2015


Author: ctopper
Date: Tue Dec 29 01:43:03 2015
New Revision: 256544

URL: http://llvm.org/viewvc/llvm-project?rev=256544&view=rev
Log:
De-virtualize mnemonicIsValid and remove from the base class. It's not called by any common code.

Modified:
    llvm/trunk/include/llvm/MC/MCTargetAsmParser.h
    llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp

Modified: llvm/trunk/include/llvm/MC/MCTargetAsmParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCTargetAsmParser.h?rev=256544&r1=256543&r2=256544&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCTargetAsmParser.h (original)
+++ llvm/trunk/include/llvm/MC/MCTargetAsmParser.h Tue Dec 29 01:43:03 2015
@@ -171,10 +171,6 @@ public:
   /// \param DirectiveID - the identifier token of the directive.
   virtual bool ParseDirective(AsmToken DirectiveID) = 0;
 
-  /// mnemonicIsValid - This returns true if this is a valid mnemonic and false
-  /// otherwise.
-  virtual bool mnemonicIsValid(StringRef Mnemonic, unsigned VariantID) = 0;
-
   /// MatchAndEmitInstruction - Recognize a series of operands of a parsed
   /// instruction as an actual MCInst and emit it to the specified MCStreamer.
   /// This returns false on success and returns true on failure to match.

Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=256544&r1=256543&r2=256544&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Tue Dec 29 01:43:03 2015
@@ -2700,7 +2700,7 @@ void AsmMatcherEmitter::run(raw_ostream
      << "&Operands);\n";
   OS << "  void convertToMapAndConstraints(unsigned Kind,\n                ";
   OS << "           const OperandVector &Operands) override;\n";
-  OS << "  bool mnemonicIsValid(StringRef Mnemonic, unsigned VariantID) override;\n";
+  OS << "  bool mnemonicIsValid(StringRef Mnemonic, unsigned VariantID);\n";
   OS << "  unsigned MatchInstructionImpl(const OperandVector &Operands,\n"
      << "                                MCInst &Inst,\n"
      << "                                uint64_t &ErrorInfo,"




More information about the llvm-commits mailing list