LLVM r183756 changed how GlobalOpt handled aliases, exposing a latent bug
in clang that caused attributes, such as __attribute__((section())) to not
be honored in emitted code with this optimization. This optimization in
question replaces an alias target with its sole alias, taking the name,
linkage, and attributes of the alias. clang creates aliases for certain
extern "C" values, setting the linkage of the alias correctly, but ignoring
the attributes. This patch gives the aliases of such extern "C" values the
same attributes as their targets, so that when GlobalOpt is performed, the
correct attributes are used.

Attachment: clang_18757.1.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to