mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
87c43f3aa9
The linkage/visibility of `__profn_*` variables are derived from the profiled functions. extern_weak => linkonce available_externally => linkonce_odr internal => private extern => private _ => unchanged The linkage/visibility of `__profc_*`/`__profd_*` variables are derived from `__profn_*` with linkage/visibility wrestling for Windows. The changes can be folded to the following without changing semantics. ``` if (TT.isOSBinFormatCOFF() && !NeedComdat) { Linkage = GlobalValue::InternalLinkage; Visibility = GlobalValue::DefaultVisibility; } ``` That said, I think we can just delete the code block. An extern/internal function will now use private `__profc_*`/`__profd_*` variables, instead of internal ones. This saves some symbol table entries. A non-comdat {linkonce,weak}_odr function will now use hidden external `__profc_*`/`__profd_*` variables instead of internal ones. There is potential object file size increase because such symbols need `/INCLUDE:` directives. However such non-comdat functions are rare (note that non-comdat weak definitions don't prevent duplicate definition error). The behavior changes match ELF. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D103355 |
||
---|---|---|
.. | ||
asan | ||
BlocksRuntime | ||
builtins | ||
cfi | ||
crt | ||
dfsan | ||
fuzzer | ||
gwp_asan | ||
hwasan | ||
interception | ||
lsan | ||
memprof | ||
msan | ||
orc | ||
profile | ||
safestack | ||
sanitizer_common | ||
scudo | ||
shadowcallstack | ||
tsan | ||
ubsan | ||
ubsan_minimal | ||
xray | ||
.clang-format | ||
.clang-tidy | ||
CMakeLists.txt | ||
lit.common.cfg.py | ||
lit.common.configured.in |