llvm-project
8f025f2a - [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (#125448)

Commit
317 days ago
[clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (#125448) Per the ELF spec, section groups may only contain local symbols if those symbols are only referenced from within the section group. [1] In the case of template parameter objects, they can be referenced from outside the group when the type of the object was declared in an anonymous namespace. In that case, we can't place the object in a COMDAT. This matches GCC's linkage behavior on the test input. [1]: https://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_groups
Author
Parents
Loading