aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2021-08-24 18:34:38 -0700
committerRichard Smith <richard@metafoo.co.uk>2021-08-24 19:53:44 -0700
commitcd4d6d718b2e51ed830a28d01d765da2a220afd3 (patch)
tree8c0dd86df600450830fcc99bfd67433a14b0b02a /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent977eeb0c38712294bdeec790ba5ac9f5d8849539 (diff)
downloadllvm-cd4d6d718b2e51ed830a28d01d765da2a220afd3.zip
llvm-cd4d6d718b2e51ed830a28d01d765da2a220afd3.tar.gz
llvm-cd4d6d718b2e51ed830a28d01d765da2a220afd3.tar.bz2
PR48030: Fix COMDAT-related linking problem with C++ thread_local static data members.
Previously when emitting a C++ guarded initializer, we tried to work out what the enclosing function would be used for and added it to the COMDAT containing the variable if we thought that doing so would be correct. But this was done from a context in which we didn't -- and realistically couldn't -- correctly infer how the enclosing function would be used. Instead, add the initialization function to a COMDAT from the code that creates it, in the case where it makes sense to do so: when we know that the one and only reference to the initialization function is in @llvm.global.ctors and that reference is in the same COMDAT. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D108680
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
0 files changed, 0 insertions, 0 deletions