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 | 3b02d95d6375439c3281c84a9620ecabc633e1a6 (patch) | |
tree | b99dce4b804effb5f50bf078ee96d588d1f503db /lib/MC/MCParser/AsmParser.cpp | |
parent | b0c76d72c3fd7878f87995a93c9724b723af4432 (diff) |
Enable target dependent directive parsing to hook before standard parser in
AsmParser::ParseStatement.
Patch by Vladimir Medic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 744514af6c..a559158c6c 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/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"); } |