forked from OSchip/llvm-project
![]() Summary: We hit undefined references building with ThinLTO when one source file contained explicit instantiations of a template method (weak_odr) but there were also implicit instantiations in another file (linkonce_odr), and the latter was the prevailing copy. In this case the symbol was marked hidden when the prevailing linkonce_odr copy was promoted to weak_odr. It led to unsats when the resulting shared library was linked with other code that contained a reference (expecting to be resolved due to the explicit instantiation). Add a CanAutoHide flag to the GV summary to allow the thin link to identify when all copies are eligible for auto-hiding (because they were all originally linkonce_odr global unnamed addr), and only do the auto-hide in that case. Most of the changes here are due to plumbing the new flag through the bitcode and llvm assembly, and resulting test changes. I augmented the existing auto-hide test to check for this situation. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, dexonsmith, arphaman, dang, llvm-commits, steven_wu, wmi Tags: #llvm Differential Revision: https://reviews.llvm.org/D59709 llvm-svn: 360466 |
||
---|---|---|
.. | ||
alias_import.ll | ||
alias_internal.ll | ||
alias_resolution.ll | ||
autoupgrade.bc | ||
cache-icall.ll | ||
cache-import-lists1.ll | ||
cache-import-lists2.ll | ||
cache-typeid-resolutions-import.ll | ||
cache-typeid-resolutions1.ll | ||
cache-typeid-resolutions2.ll | ||
cache-typeid-resolutions3.ll | ||
cache.ll | ||
callees-metadata.ll | ||
cfi-distributed.ll | ||
crash_debuginfo.ll | ||
deadstrip.ll | ||
debuginfo-compositetype-import.ll | ||
debuginfo-cu-import.ll | ||
diagnostic-handler-remarks.ll | ||
dicompositetype-unique-alias.ll | ||
dicompositetype-unique.ll | ||
dicompositetype-unique2.ll | ||
distributed_import.ll | ||
distributed_indexes.ll | ||
dot-dumper.ll | ||
drop-debug-info.bc | ||
drop-debug-info.ll | ||
dsolocal_dllimport.ll | ||
emit_imports.ll | ||
emit_imports2.ll | ||
empty.ll | ||
empty_module_with_cache.ll | ||
export.ll | ||
funcimport-debug.ll | ||
funcimport-tbaa.ll | ||
funcimport.ll | ||
funcimport2.ll | ||
function_entry_count.ll | ||
globals-import-blockaddr.ll | ||
globals-import-cf-baz.ll | ||
globals-import.ll | ||
import_opaque_type.ll | ||
index-const-prop-alias.ll | ||
index-const-prop-cache-foo.ll | ||
index-const-prop-cache-test1.ll | ||
index-const-prop-cache-test2.ll | ||
index-const-prop-comdat.ll | ||
index-const-prop-define-g.ll | ||
index-const-prop-full-lto.ll | ||
index-const-prop-gvref.ll | ||
index-const-prop-linkage.ll | ||
index-const-prop.ll | ||
lazyload_metadata.ll | ||
linkonce_aliasee_ref_import.ll | ||
linkonce_odr_unnamed_addr.ll | ||
linkonce_resolution_comdat.ll | ||
llvm.used.ll | ||
local_name_conflict1.ll | ||
local_name_conflict2.ll | ||
local_name_conflict_var1.ll | ||
local_name_conflict_var2.ll | ||
merge-triple.ll | ||
module_asm.ll | ||
module_asm2.ll | ||
noinline.ll | ||
personality-local.ll | ||
personality.ll | ||
pr35472.ll | ||
reference_non_importable.ll | ||
referenced_by_constant.ll | ||
section.ll | ||
select_right_alias_definition1.ll | ||
select_right_alias_definition2.ll | ||
strong_non_prevailing.ll | ||
thinlto-internalize-used2.ll | ||
weak_resolution.ll |