eandrews added a comment.

In https://reviews.llvm.org/D36712#842477, @kparzysz wrote:

> In the cases when the section is explicitly given on a definition, it was 
> likely imposed by something like the "section" attribute in the source. I 
> don't think it's unreasonable to expect that the declarations (in the 
> original source as well as in the generated IR) should carry that information 
> as well. However, since clang has apparently been ignoring that attribute on 
> declarations, it's been generating IR where declarations may not have 
> sections, but the corresponding definitions do.


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

I can mention this case explicitly in the documentation. However I am not sure 
whether it's UB or if the global will be defined in specified section.


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