diff options
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 89036376780..aa3489a0573 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1396,6 +1396,8 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, // See what kind of statement we have. switch (Lexer.getKind()) { case AsmToken::Colon: { + if (!getTargetParser().isLabel(ID)) + break; checkForValidSection(); // identifier ':' -> Label. @@ -1454,6 +1456,8 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, } case AsmToken::Equal: + if (!getTargetParser().equalIsAsmAssignment()) + break; // identifier '=' ... -> assignment statement Lex(); @@ -1701,7 +1705,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, // Canonicalize the opcode to lower case. std::string OpcodeStr = IDVal.lower(); ParseInstructionInfo IInfo(Info.AsmRewrites); - bool HadError = getTargetParser().ParseInstruction(IInfo, OpcodeStr, IDLoc, + bool HadError = getTargetParser().ParseInstruction(IInfo, OpcodeStr, ID, Info.ParsedOperands); Info.ParseError = HadError; |