[llvm][Patch 3/3] ppc-darwin AsmParser Base implementation.

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Fri Dec 6 05:11:45 PST 2013


Iain Sandoe <iain at codesourcery.com> wrote:

> Part 3 Enables parsing of lo16() hi16() and ha16() as modifiers.
>
> Note that the ELF form (xx at l xx at ha etc.) is handled by the
> expression logic, but the MachO version is not.  For the present, I
> have handled it locally - if there's some merit or reason that this
> logic should be shifted to a higher level then, fine.

+    if (!isDarwin()) {
+      if(!ParseExpression(EVal))
+        break;
+    } else {
+      if(!ParseDarwinExpression(EVal))
+        break;
+    }

Instead of every call to ParseExpression having to make this
distinction, wouldn't it be easier to just check for isDarwin
*inside* of ParseExpression?

Otherwise, looks good to me.

Thanks,
Ulrich





More information about the llvm-commits mailing list