Mark the eh.typeid.for intrinsic as being 'const', which it is inside
[oota-llvm.git] / include / llvm / MC / MCTargetAsmParser.h
index 0bd4f25636ba9847b3faf9d97a1c53bc0c612b5a..4e3fd0d3a9ec3396919671f499a26dbb2a1f79ea 100644 (file)
@@ -18,15 +18,27 @@ class StringRef;
 class SMLoc;
 class AsmToken;
 class MCParsedAsmOperand;
+class MCInst;
 template <typename T> class SmallVectorImpl;
 
 /// 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,
+    FIRST_TARGET_MATCH_RESULT_TY
+  };
+
+private:
   MCTargetAsmParser(const MCTargetAsmParser &);   // DO NOT IMPLEMENT
   void operator=(const MCTargetAsmParser &);  // DO NOT IMPLEMENT
 protected: // Can only create subclasses.
   MCTargetAsmParser();
+
   /// AvailableFeatures - The current set of available features.
   unsigned AvailableFeatures;
 
@@ -66,18 +78,24 @@ public:
   ///
   /// \param DirectiveID - the identifier token of the directive.
   virtual bool ParseDirective(AsmToken DirectiveID) = 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.
   ///
   /// On failure, the target parser is responsible for emitting a diagnostic
   /// explaining the match failure.
-  virtual bool 
+  virtual bool
   MatchAndEmitInstruction(SMLoc IDLoc,
                           SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                           MCStreamer &Out) = 0;
-  
+
+  /// checkTargetMatchPredicate - Validate the instruction match against
+  /// any complex target predicates not expressible via match classes.
+  virtual unsigned checkTargetMatchPredicate(MCInst &Inst) {
+    return Match_Success;
+  }
+
 };
 
 } // End llvm namespace