Fix for pr13145: Naming a function like a register name confuses the asm parser

Chad Rosier mcrosier at apple.com
Fri Mar 15 09:41:08 PDT 2013


Hi Stepan,
Here are a few nits:

When writing comments, write them as English prose, which means they should use proper capitalization, punctuation, etc.

+    // Want label whatever happened...
+    bool wantLabelOnly = Mnemonic == "b" || Mnemonic == "bl";

Maybe the comment could be something like, "If we've seen a branch mnemonic, the next operand must be a label."

You could also rename wantLabelOnly to ExpectLabel or just put the conditional in the if statement; the comment should make clear the condition of the if statement.

Most importantly, please add a test case before resubmitting to the list.

 Chad

On Mar 15, 2013, at 1:29 AM, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:

> Hi all!
> Please review the patch in attachment as fix for PR13145.
> Patch adds special condition for identifier parsing, for case when mnemonic is "b" or "bl": even operands like "r1" would be treated as labels.
> 
> -Stepan.
> <pr13145.patch>_______________________________________________
> 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/20130315/c6756526/attachment.html>


More information about the llvm-commits mailing list