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

Saleem Abdulrasool compnerd at compnerd.org
Sat Dec 14 22:05:04 PST 2013

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.



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 =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2410.1.patch
Type: text/x-patch
Size: 502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131214/5788fb1a/attachment.bin>

More information about the llvm-commits mailing list