[lto] Do not try to internalize symbols with escaped name
Because of LLVM mangling escape sequence (through '\01' prefix), it is possible for a single symbols two have two different IR representations. For instance, consider @symbol and @"\01_symbol". On OSX, because of the system mangling rules, these two IR names point are converted in the same final symbol upon linkage. LTO doesn't model this behavior, which may result in symbols being incorrectly internalized (if all reference use the escaping sequence while the definition doesn't). The proper approach is probably to use the mangled name to compute GUID to avoid the dual representation, but we can also avoid discarding symbols that are bound to two different IR names. This is an approximation, but it's less intrusive on the codebase. Fix #57864 Differential Revision: https://reviews.llvm.org/D135710
parent
0c8dde55
Please register or sign in to comment