diff options
Diffstat (limited to 'include/llvm/Target/TargetAsmParser.h')
-rw-r--r-- | include/llvm/Target/TargetAsmParser.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetAsmParser.h b/include/llvm/Target/TargetAsmParser.h index f431c38dc3a5..5830d1f99f5c 100644 --- a/include/llvm/Target/TargetAsmParser.h +++ b/include/llvm/Target/TargetAsmParser.h @@ -28,14 +28,20 @@ class TargetAsmParser : public MCAsmParserExtension { protected: // Can only create subclasses. TargetAsmParser(const Target &); - /// TheTarget - The Target that this machine was created for. + /// The Target that this machine was created for. const Target &TheTarget; + /// The current set of available features. + unsigned AvailableFeatures; + public: virtual ~TargetAsmParser(); const Target &getTarget() const { return TheTarget; } + unsigned getAvailableFeatures() const { return AvailableFeatures; } + void setAvailableFeatures(unsigned Value) { AvailableFeatures = Value; } + /// ParseInstruction - Parse one assembly instruction. /// /// The parser is positioned following the instruction name. The target @@ -67,8 +73,12 @@ public: /// MatchInstruction - Recognize a series of operands of a parsed instruction /// as an actual MCInst. This returns false and fills in Inst 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 - MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*> &Operands, + MatchInstruction(SMLoc IDLoc, + const SmallVectorImpl<MCParsedAsmOperand*> &Operands, MCInst &Inst) = 0; }; |