[PATCH] D18252: Drop comdats from the dst module if they are not selected

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 14:28:22 PDT 2016


On 22 March 2016 at 17:06, Teresa Johnson <tejohnson at google.com> wrote:
> tejohnson accepted this revision.
> tejohnson added a reviewer: tejohnson.
> tejohnson added a comment.
> This revision is now accepted and ready to land.
>
> LGTM with a couple small nits.
>
>
> ================
> Comment at: lib/Linker/LinkModules.cpp:519
> @@ +518,3 @@
> +
> +  // Alias have to go first, since we are no able to find their comdats
> +  // otherwise.
> ----------------
> s/no able/not able/
>
> ================
> Comment at: test/Linker/comdat-rm-dst.ll:3
> @@ +2,3 @@
> +; RUN: FileCheck %s < %t
> +; RUN: FileCheck --check-prefix=RM %s < %t
> +
> ----------------
> Why can't these two FileCheck invocations be combined? They are scanning the same output file.

In this case they can. Originally the test had CHECKs and CHECK-NOTs.
CHECKs bind first, so to see something is not anywhere in the file you
have to do two runs.

CHECK-NOT binds before CHECK-DAG, so it would work but I find it a bit
subtle. Check the "FileCheck: combining -DAG and -NOT" thread.

Cheers,
Rafael


More information about the llvm-commits mailing list