[PATCH] D31444: LTO: call getRealLinkageName on IRNames before feeding to getGUID

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 13:54:32 PDT 2017


tejohnson added a comment.

In https://reviews.llvm.org/D31444#713417, @mehdi_amini wrote:

> In https://reviews.llvm.org/D31444#713402, @rnk wrote:
>
> > In https://reviews.llvm.org/D31444#712724, @pcc wrote:
> >
> > > So maybe we should have just one static function:
> > >
> > >   static GUID getGUID(StringRef Name, GlobalValue::LinkageTypes Linkage, StringRef FileName);
> > >
> > > That should hopefully make the API harder to misuse.
> >
>
>
> +1 as well.


I agree that change would help.

Looks like getGlobalIdentifier effectively already does the functionality in getRealLinkageName (but should be refactored to just call getRealLinkageName) - so can you fix this bug by invoking the static getGlobalIdentifier instead? That will make the transition to the above single getGUID static API simpler (since it will take the same parameters).


https://reviews.llvm.org/D31444





More information about the llvm-commits mailing list