[PATCH] D15084: Split the linker in 2

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 08:13:08 PST 2015


On 8 December 2015 at 21:28, Teresa Johnson <tejohnson at google.com> wrote:
> tejohnson added inline comments.
>
> ================
> Comment at: lib/Linker/LinkModules.cpp:127
> @@ -519,1 +126,3 @@
>
> +  void doThinLTOPromotion();
> +
> ----------------
> doxygen comments for here and below


Done.

>
> ================
> Comment at: lib/Linker/LinkModules.cpp:313
> @@ -707,3 +312,3 @@
>      // If imported as a declaration, it becomes external_weak.
> -    return GlobalValue::ExternalWeakLinkage;
> +    return GlobalValue::WeakAnyLinkage;
>
> ----------------
> Why this change? I thought for a declaration it should be external_weak? If it needs to be changed the comment is stale.

Sorry. Leftover from and old try. Thanks for catching.

> ================
> Comment at: lib/Linker/LinkModules.cpp:697
> @@ -1805,1 +696,3 @@
>    }
> +  GV.setName(getName(&GV));
> +  GV.setLinkage(getLinkage(&GV));
> ----------------
> We should only need to promote and make these changes if we are inside the above if statement (i.e. promoting a local to global). So I think the setName, setLinkage and setVisibility can be moved within the if local linkage & promote body.

I moved as much to the if as possible.

Uploading a new patch.


More information about the llvm-commits mailing list