[PATCH] MC: do not try to parse invalid handled directives

David Blaikie dblaikie at gmail.com
Sun Dec 15 01:56:49 PST 2013


Test case?


On Sat, Dec 14, 2013 at 10:05 PM, Saleem Abdulrasool
<compnerd at compnerd.org>wrote:

> Hi t.p.northover,
>
> If the target specific parser handles the directive and there is an error,
> do
> not try to fall back to the common directive handling.
>
> http://llvm-reviews.chandlerc.com/D2410
>
> Files:
>   lib/MC/MCParser/AsmParser.cpp
>
> Index: lib/MC/MCParser/AsmParser.cpp
> ===================================================================
> --- lib/MC/MCParser/AsmParser.cpp
> +++ lib/MC/MCParser/AsmParser.cpp
> @@ -1327,6 +1327,9 @@
>      if (!getTargetParser().ParseDirective(ID))
>        return false;
>
> +    if (HadError)
> +      return false;
> +
>      // Next, check the extention directive map to see if any extension has
>      // registered itself to parse this directive.
>      std::pair<MCAsmParserExtension *, DirectiveHandler> Handler =
>
> _______________________________________________
> 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/20131215/10655214/attachment.html>


More information about the llvm-commits mailing list