diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-08-15 23:03:29 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-08-15 23:03:29 +0000 |
commit | 19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5 (patch) | |
tree | 17aca7047cafd6a4f580f0fe5386f1d321de46c8 /include/llvm/MC | |
parent | 6326a4238df05dafd7547cfa2cd71111cd6702a6 (diff) | |
download | external_llvm-19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5.zip external_llvm-19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5.tar.gz external_llvm-19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5.tar.bz2 |
MCTargetAsmParser target match predicate support.
Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCTargetAsmParser.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/MC/MCTargetAsmParser.h b/include/llvm/MC/MCTargetAsmParser.h index fcb5edc..4e3fd0d 100644 --- a/include/llvm/MC/MCTargetAsmParser.h +++ b/include/llvm/MC/MCTargetAsmParser.h @@ -18,6 +18,7 @@ class StringRef; class SMLoc; class AsmToken; class MCParsedAsmOperand; +class MCInst; template <typename T> class SmallVectorImpl; /// MCTargetAsmParser - Generic interface to target specific assembly parsers. @@ -28,7 +29,8 @@ public: Match_InvalidOperand, Match_MissingFeature, Match_MnemonicFail, - Match_Success + Match_Success, + FIRST_TARGET_MATCH_RESULT_TY }; private: @@ -88,6 +90,12 @@ public: 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 |