[PATCH] D37266: [ThinLTO] Clean up stale alias import handling

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 11:12:45 PDT 2017


On Tue, Aug 29, 2017 at 11:09 AM Teresa Johnson via Phabricator <
reviews at reviews.llvm.org> wrote:

> tejohnson added a comment.
>
> In https://reviews.llvm.org/D37266#855617, @dblaikie wrote:
>
> > Is it worth having the DEBUG output if no aliases are ever imported?
>
>
> I think it is worthwhile emitting this since we also emit the
> functions/vars that are not imported.
>
> > Could potentially rewrite this whole loop as:
> >
> >   assert(none_of(SrcModule.aliases(), [&](GlobalAlias &GA) { if
> (!GA.hasName()) return false; return ImportGUIDs.count(GA.getGUID()); }) &&
> "Unexpected alias in import list");
> >
> >
> > Dunno if that comes out more legible, though.
>
> I was trying to keep it somewhat symmetric with the earlier code handling
> functions and variables. I'm hoping to start looking at importing these as
> a copy, which would mean this would go back to a loop anyway. I will change
> it if you feel strongly that this is better though.
>

Nah, whatever suits you


>
>
> https://reviews.llvm.org/D37266
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170829/c92c7e02/attachment.html>


More information about the llvm-commits mailing list