diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-05 19:09:33 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-05 19:09:33 +0000 |
commit | d359075e436d8f60f858d5f911fef11a020b3614 (patch) | |
tree | cdb9d813c0eb98c19f8dd12b9f49d8f13d002070 /llvm/lib | |
parent | 9b1932d4e471419238bbee26e4b2f0aacfb264ba (diff) | |
download | bcm5719-llvm-d359075e436d8f60f858d5f911fef11a020b3614.tar.gz bcm5719-llvm-d359075e436d8f60f858d5f911fef11a020b3614.zip |
Enable target dependent directive parsing to hook before standard parser in
AsmParser::ParseStatement.
Patch by Vladimir Medic.
llvm-svn: 159768
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 744514af6c5..a559158c6c6 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -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"); } |