diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-13 00:26:04 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-13 00:26:04 +0000 |
commit | 84125ca43c758fd21fdab2b05196e0df57c55c96 (patch) | |
tree | 539f0b38eee40c8e292f5a35a0b46cd2641edfc5 /include/llvm/MC | |
parent | fa8cd9d64a3bd090d9176ea019a6d1b6b2051dd0 (diff) | |
download | external_llvm-84125ca43c758fd21fdab2b05196e0df57c55c96.zip external_llvm-84125ca43c758fd21fdab2b05196e0df57c55c96.tar.gz external_llvm-84125ca43c758fd21fdab2b05196e0df57c55c96.tar.bz2 |
[ms-inline asm] Remove the MatchInstruction() function. Previously, this was
the interface between the front-end and the MC layer when parsing inline
assembly. Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.). Note the MatchAndEmitInstruction() isn't the correct
abstraction either. I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCParser/MCAsmParser.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCTargetAsmParser.h | 22 |
2 files changed, 6 insertions, 18 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h index adc960d..a572e6d 100644 --- a/include/llvm/MC/MCParser/MCAsmParser.h +++ b/include/llvm/MC/MCParser/MCAsmParser.h @@ -73,6 +73,8 @@ public: /// Run - Run the parser on the input source buffer. virtual bool Run(bool NoInitialTextSection, bool NoFinalize = false) = 0; + virtual void setParsingInlineAsm(bool V) = 0; + /// Warning - Emit a warning at the location \p L, with the message \p Msg. /// /// \return The return value is true, if warnings are fatal. diff --git a/include/llvm/MC/MCTargetAsmParser.h b/include/llvm/MC/MCTargetAsmParser.h index 3952f7f..c9ea5ae 100644 --- a/include/llvm/MC/MCTargetAsmParser.h +++ b/include/llvm/MC/MCTargetAsmParser.h @@ -82,21 +82,6 @@ public: /// otherwise. virtual bool mnemonicIsValid(StringRef Mnemonic) = 0; - /// MatchInstruction - Recognize a series of operands of a parsed instruction - /// as an actual MCInst. 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 - MatchInstruction(SMLoc IDLoc, - SmallVectorImpl<MCParsedAsmOperand*> &Operands, - MCStreamer &Out, unsigned &Opcode, unsigned &OrigErrorInfo, - bool MatchingInlineAsm = false) { - OrigErrorInfo = ~0x0; - return true; - } - /// 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. @@ -104,9 +89,10 @@ public: /// On failure, the target parser is responsible for emitting a diagnostic /// explaining the match failure. virtual bool - MatchAndEmitInstruction(SMLoc IDLoc, + MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, SmallVectorImpl<MCParsedAsmOperand*> &Operands, - MCStreamer &Out) = 0; + MCStreamer &Out, unsigned &ErrorInfo, + bool MatchingInlineAsm) = 0; /// checkTargetMatchPredicate - Validate the instruction match against /// any complex target predicates not expressible via match classes. @@ -115,7 +101,7 @@ public: } virtual void convertToMapAndConstraints(unsigned Kind, - const SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0; + const SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0; }; } // End llvm namespace |