aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/ModuleDeclStateTest.cpp
diff options
context:
space:
mode:
authorPaschalis Mpeis <paschalis.mpeis@arm.com>2025-04-04 17:31:14 +0100
committerGitHub <noreply@github.com>2025-04-04 17:31:14 +0100
commit3d24046b3306cbc682aa1f17426169a942d8931a (patch)
treebdd078d5616429867392553a1efc1d5f8fead9b2 /clang/unittests/Lex/ModuleDeclStateTest.cpp
parente8d50097849081168f0285418ce8a36733eb7154 (diff)
downloadllvm-3d24046b3306cbc682aa1f17426169a942d8931a.zip
llvm-3d24046b3306cbc682aa1f17426169a942d8931a.tar.gz
llvm-3d24046b3306cbc682aa1f17426169a942d8931a.tar.bz2
[BOLT] Skip out-of-range pending relocations (#116964)
When a pending relocation is created it is also marked whether it is optional or not. It can be optional when such relocation is added as part of an optimization (i.e., `scanExternalRefs`). When bolt tries to `flushPendingRelocations`, it safely skips any optional relocations that cannot be encoded due to being out of range. A pre-requisite to that is the usage of the `-force-patch` flag. Alternatrively, BOLT will bail out with a relevant message. Background: BOLT, as part of scanExternalRefs, identifies external references from calls and creates some pending relocations for them. Those when flushed will update references to point to the optimized functions. This optimization can be disabled using `--no-scan`. BOLT can assert if any of these pending relocations cannot be encoded. This patch does not disable this optimization but instead selectively applies it given that a pending relocation is optional and `-force-patch` was enabled.
Diffstat (limited to 'clang/unittests/Lex/ModuleDeclStateTest.cpp')
0 files changed, 0 insertions, 0 deletions