[llvm-commits] [llvm] r159768 - /llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Chandler Carruth
chandlerc at google.com
Thu Jul 5 17:42:01 PDT 2012
Test case?
On Thu, Jul 5, 2012 at 12:09 PM, Akira Hatanaka <ahatanaka at mips.com> wrote:
> Author: ahatanak
> Date: Thu Jul 5 14:09:33 2012
> New Revision: 159768
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159768&view=rev
> Log:
> Enable target dependent directive parsing to hook before standard parser in
> AsmParser::ParseStatement.
>
> Patch by Vladimir Medic.
>
>
> Modified:
> llvm/trunk/lib/MC/MCParser/AsmParser.cpp
>
> Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=159768&r1=159767&r2=159768&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
> +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Thu Jul 5 14:09:33 2012
> @@ -1167,6 +1167,11 @@
>
> // 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 @@
> 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");
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120705/4d053553/attachment.html>
More information about the llvm-commits
mailing list