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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 11:09:58 PDT 2017


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.


https://reviews.llvm.org/D37266





More information about the llvm-commits mailing list