I tried to apply this with a test case that doesn't run the optimizer, and discovered something scary. GlobalAlias inherits from GlobalValue and therefore has a section, but the LangRef doesn't document this and we don't know how to serialize and deserialize it.
So, if we applied this patch, the section on the alias would be dropped if we did LTO. :( On Thu, Feb 6, 2014 at 3:17 PM, Mark Mentovai <[email protected]> wrote: > 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. > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
