[PATCH] Use an 'l' prefix when an 'L' prefix would produce an invalid MachO

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Feb 13 15:01:52 PST 2014


On 13 February 2014 17:49, kledzik at apple.com <kledzik at apple.com> wrote:
>
>
> ================
> Comment at: test/CodeGen/PowerPC/osx-private-labels.ll:1
> @@ +1,2 @@
> +; RUN: llc < %s -mtriple=powerpc-apple-darwin | FileCheck %s
> +; Test all the cases where a L label is safe. Removing any entry from
> ----------------
> powerpc is not an architecture that is actively used and tested for mach-o.   x86_64 would be better.

I started with that, but hit the issue described on the patch "Use
__literal16 on x86-64"

> ================
> Comment at: test/CodeGen/PowerPC/osx-private-labels.ll:70
> @@ +69,2 @@
> +; CHECK-NEXT: .align   2
> +; CHECK-NEXT: L_private12:
> ----------------
> Shouldn't there also be test which *do* get changed into 'l' labels?

Well, there are the cases that the patch modifies, like the ones in
private.ll. Do you have any particular section in mind that we should
test?

> ================
> Comment at: test/CodeGen/PowerPC/osx-private-labels.ll:10-14
> @@ +9,7 @@
> +
> + at private2 = private unnamed_addr constant [5 x i16] [i16 116, i16 101,
> +                                                     i16 115, i16 116, i16 0]
> +; CHECK: .section      __TEXT,__ustring
> +; CHECK-NEXT: .align   1
> +; CHECK-NEXT: L_private2:
> +
> ----------------
> The __ustring section does need labels for the linker to see.

Ah, curious. I will update the patch. Any reason for it? It would be
nice to document in a comment so it doesn't look like something that
was simply forgotten.

Cheers,
Rafael



More information about the llvm-commits mailing list