diff options
author | dim <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | 5d5cc59cc77afe655b3707cb0e69e0827b444cad (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /include/llvm/Target/TargetAsmParser.h | |
parent | 786a18553586229ad99ecb5ecde8a9d914c45e27 (diff) | |
download | FreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.zip FreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.tar.gz |
Vendor import of llvm r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020
Approved by: rpaulo (mentor)
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 f431c38..5830d1f 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; }; |