summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-01 23:45:51 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-01 23:45:51 +0000
commit22685876ed7231f32f7d1698c00acab22825b74c (patch)
treee2240c27a0c5b7cfd1176155666f250b13127297 /include
parent3fc42fd77c7f8bdb2729ce5405d65297bbfdff84 (diff)
downloadllvm-22685876ed7231f32f7d1698c00acab22825b74c.tar.gz
llvm-22685876ed7231f32f7d1698c00acab22825b74c.tar.bz2
llvm-22685876ed7231f32f7d1698c00acab22825b74c.tar.xz
[ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands. This replaces the getMCInstOperandNum() function. The logic to determine the constraints are not in place, so we still default to a register constraint (i.e., "r"). Also, we no longer build the MCInst but rather return just the opcode to get the MCInstrDesc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCTargetAsmParser.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/MC/MCTargetAsmParser.h b/include/llvm/MC/MCTargetAsmParser.h
index 2b5a672d6d..16cf6273a5 100644
--- a/include/llvm/MC/MCTargetAsmParser.h
+++ b/include/llvm/MC/MCTargetAsmParser.h
@@ -89,11 +89,11 @@ public:
/// On failure, the target parser is responsible for emitting a diagnostic
/// explaining the match failure.
virtual bool
- MatchInstruction(SMLoc IDLoc, unsigned &Kind,
+ MatchInstruction(SMLoc IDLoc,
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- SmallVectorImpl<MCInst> &MCInsts,
- unsigned &OrigErrorInfo,
- bool matchingInlineAsm = false) {
+ MCStreamer &Out, unsigned &Kind, unsigned &Opcode,
+ SmallVectorImpl<std::pair< unsigned, std::string > > &MapAndConstraints,
+ unsigned &OrigErrorInfo, bool matchingInlineAsm = false) {
OrigErrorInfo = ~0x0;
return true;
}
@@ -115,10 +115,9 @@ public:
return Match_Success;
}
- virtual unsigned getMCInstOperandNum(unsigned Kind,
+ virtual void convertToMapAndConstraints(unsigned Kind,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum,
- unsigned &NumMCOperands) = 0;
+ SmallVectorImpl<std::pair< unsigned, std::string > > &MapAndConstraints) = 0;
};
} // End llvm namespace