1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Enable target dependent directive parsing to hook before standard parser in

AsmParser::ParseStatement.

Patch by Vladimir Medic.

llvm-svn: 159768
This commit is contained in:
Akira Hatanaka 2012-07-05 19:09:33 +00:00
parent 1304227af1
commit 4ce0c1ffe9

View File

@ -1167,6 +1167,11 @@ bool AsmParser::ParseStatement() {
// Otherwise, we have a normal instruction or directive.
if (IDVal[0] == '.' && IDVal != ".") {
// Target hook for parsing target specific directives.
if (!getTargetParser().ParseDirective(ID))
return false;
// Assembler features
if (IDVal == ".set" || IDVal == ".equ")
return ParseDirectiveSet(IDVal, true);
@ -1292,9 +1297,6 @@ bool AsmParser::ParseStatement() {
if (Handler.first)
return (*Handler.second)(Handler.first, IDVal, IDLoc);
// Target hook for parsing target specific directives.
if (!getTargetParser().ParseDirective(ID))
return false;
return Error(IDLoc, "unknown directive");
}