vsk added a comment. In D58737#1412846 <https://reviews.llvm.org/D58737#1412846>, @rnk wrote:
> Oops, forgot to respond to this... > > In D58737#1412734 <https://reviews.llvm.org/D58737#1412734>, @vsk wrote: > > > I'm confused by this wording re: comdats in the LangRef: "All global > > objects that specify this key will only end up in the final object file if > > the linker chooses that key over some other key". Why can multiple global > > objects with the same comdat key end up in the final object file? > > > These words are trying to say that, some number of global objects can use a > comdat key. If the object file they are contained in has the prevailing > definition of that comdat key, then they will be included, and they will be > discarded if not. The prevailing object is typically just the first object > file that uses the comdat. > > So, multiple objects from *one TU* can use the key and end up in the final > binary, but objects from different TUs will never end up mixed together in > the final binary. Ah, got it, thanks :) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58737/new/ https://reviews.llvm.org/D58737 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits