[llvm-commits] [llvm] r137649 - in /llvm/trunk: include/llvm/MC/MCTargetAsmParser.h utils/TableGen/AsmMatcherEmitter.cpp
Jim Grosbach
grosbach at apple.com
Mon Aug 15 13:53:08 PDT 2011
Author: grosbach
Date: Mon Aug 15 15:53:08 2011
New Revision: 137649
URL: http://llvm.org/viewvc/llvm-project?rev=137649&view=rev
Log:
Move MatchResultTy enum into base class definition.
No need for it to be redefined as part of every derived target asm parser
class.
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=137649&r1=137648&r2=137649&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCTargetAsmParser.h (original)
+++ llvm/trunk/include/llvm/MC/MCTargetAsmParser.h Mon Aug 15 15:53:08 2011
@@ -22,6 +22,16 @@
/// MCTargetAsmParser - Generic interface to target specific assembly parsers.
class MCTargetAsmParser : public MCAsmParserExtension {
+public:
+ enum MatchResultTy {
+ Match_ConversionFail,
+ Match_InvalidOperand,
+ Match_MissingFeature,
+ Match_MnemonicFail,
+ Match_Success
+ };
+
+private:
MCTargetAsmParser(const MCTargetAsmParser &); // DO NOT IMPLEMENT
void operator=(const MCTargetAsmParser &); // DO NOT IMPLEMENT
protected: // Can only create subclasses.
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=137649&r1=137648&r2=137649&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Mon Aug 15 15:53:08 2011
@@ -2174,13 +2174,6 @@
OS << " // This should be included into the middle of the declaration of\n";
OS << " // your subclasses implementation of MCTargetAsmParser.\n";
OS << " unsigned ComputeAvailableFeatures(uint64_t FeatureBits) const;\n";
- OS << " enum MatchResultTy {\n";
- OS << " Match_ConversionFail,\n";
- OS << " Match_InvalidOperand,\n";
- OS << " Match_MissingFeature,\n";
- OS << " Match_MnemonicFail,\n";
- OS << " Match_Success\n";
- OS << " };\n";
OS << " bool ConvertToMCInst(unsigned Kind, MCInst &Inst, "
<< "unsigned Opcode,\n"
<< " const SmallVectorImpl<MCParsedAsmOperand*> "
More information about the llvm-commits
mailing list