kparzysz added a comment.

In https://reviews.llvm.org/D36712#843387, @eandrews wrote:

> Does this result in unexpected behavior though? Won't this just result in the 
> global being defined in the specified section?


If there is no section given explicitly, there is function 
SelectSectionForGlobal that will determine the section based on the properties 
of the global.  If there is code that only sees the declaration, but needs to 
know the section, it will get it from that function.  If the definition of that 
global doesn't have section either, that same function will be used, hopefully 
with the same result.  On the other hand, if the definition of the global has 
an explicit section, it may differ from the one calculated for the declarations 
of that global.  This could lead to a problem.


https://reviews.llvm.org/D36712



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to