summaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-15 19:08:18 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-15 19:08:18 +0000
commit127f5edfd98893d8910a9ae59b10696a824fed24 (patch)
treee2e8daad8604614ab373b70fe88233c7c141199e /lib/MC
parent3da6f0392a7d936306c8c6c75e5dd7046b551496 (diff)
downloadllvm-127f5edfd98893d8910a9ae59b10696a824fed24.tar.gz
llvm-127f5edfd98893d8910a9ae59b10696a824fed24.tar.bz2
llvm-127f5edfd98893d8910a9ae59b10696a824fed24.tar.xz
[ms-inline asm] If we parsed a statement and the opcode is valid, then it's an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index 0a8053121c..0406ff8d44 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/lib/MC/MCParser/AsmParser.cpp
@@ -136,9 +136,6 @@ private:
/// 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;
@@ -195,7 +192,7 @@ public:
delete ParsedOperands[i];
ParsedOperands.clear();
}
- bool isInstruction() { return IsInstruction; }
+ bool isInstruction() { return Opcode != (unsigned)~0x0; }
unsigned getOpcode() { return Opcode; }
bool ParseExpression(const MCExpr *&Res);
@@ -439,7 +436,7 @@ AsmParser::AsmParser(SourceMgr &_SM, MCContext &_Ctx,
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();