aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorJesse Meyer <jesse.r.meyer@me.com>2026-02-03 20:16:44 -0500
committerJesse Meyer <jesse.r.meyer@me.com>2026-02-03 20:16:44 -0500
commitbd6148dd6b77920cf64fea8804b205e8257e8a66 (patch)
treed85e732bcf461f9001b7e38349fd3284744b2a6d /src/check_decl.cpp
parenta0562dfd6e5cd47217f6cdf5cee2c767a7ba8318 (diff)
Fix Windows LTO: preserve required procedures with llvm.used
On Windows with LTO, required procedures with external linkage need to be added to @llvm.used to survive linker-level dead code elimination. LLVM may generate implicit calls to runtime builtins (e.g., __extendhfsf2 for f16 conversions) during instruction lowering, after the IR is finalized. Without @llvm.used, the linker discards these procedures before the implicit calls are generated. This adds required procedures to @llvm.used at creation time. The fix is Windows-specific; other platforms handle this correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/check_decl.cpp')
0 files changed, 0 insertions, 0 deletions