hanchenye-llvm-project/clang/include
Rafael Espindola 1e4df92f49 Add support for putting constructors and destructos in explicit comdats.
There are situations when clang knows that the C1 and C2 constructors
or the D1 and D2 destructors are identical. We already optimize some
of these cases, but cannot optimize it when the GlobalValue is
weak_odr.

The problem with weak_odr is that an old TU seeing the same code will
have a C1 and a C2 comdat with the corresponding symbols. We cannot
suddenly start putting the C2 symbol in the C1 comdat as we cannot
guarantee that the linker will not pick a .o with only C1 in it.

The solution implemented by GCC is to expand the ABI to have a comdat
whose name uses a C5/D5 suffix and always has both symbols. That is
what this patch implements.

llvm-svn: 217874
2014-09-16 15:18:21 +00:00
..
clang Add support for putting constructors and destructos in explicit comdats. 2014-09-16 15:18:21 +00:00
clang-c [libclang] Introduce clang_File_isEqual for comparing CXFile handles. 2014-08-16 00:26:19 +00:00
CMakeLists.txt
Makefile