/// ParsingInlineAsm - Are we parsing ms-style inline assembly?
bool ParsingInlineAsm;
- /// IsInstruction - Was the last parsed statement an instruction?
- bool IsInstruction;
-
/// ParsedOperands - The parsed operands from the last parsed statement.
SmallVector<MCParsedAsmOperand*, 8> ParsedOperands;
delete ParsedOperands[i];
ParsedOperands.clear();
}
- bool isInstruction() { return IsInstruction; }
+ bool isInstruction() { return Opcode != (unsigned)~0x0; }
unsigned getOpcode() { return Opcode; }
bool ParseExpression(const MCExpr *&Res);
GenericParser(new GenericAsmParser), PlatformParser(0),
CurBuffer(0), MacrosEnabled(true), CppHashLineNumber(0),
AssemblerDialect(~0U), IsDarwin(false), ParsingInlineAsm(false),
- IsInstruction(false), Opcode(0) {
+ Opcode(~0x0) {
// Save the old handler.
SavedDiagHandler = SrcMgr.getDiagHandler();
SavedDiagContext = SrcMgr.getDiagContext();
assert(Op->isToken() && "Leading operand should always be a mnemonic!");
ArrayRef<SMRange> EmptyRanges = ArrayRef<SMRange>();
+ // Clear the opcode.
+ Opcode = ~0x0;
+
// First, handle aliases that expand to multiple instructions.
// FIXME: This should be replaced with a real .td file alias mechanism.
// Also, MatchInstructionImpl should actually *do* the EmitInstruction