mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 07:26:41 +00:00

If a weak function is missing, still return it's address (zero) rather than failing interpretation. Otherwise we have a mismatch between Interpret() and CanInterpret() resulting in failures that would not occur with JIT execution. Alternatively, we could try to look for weak symbols in CanInterpret() and generally reject them there. This is the root cause for the issue exposed by https://github.com/llvm/llvm-project/pull/92885. Previously, the case affected by that always fell back to JIT because an icmp constant expression was used, which is not supported by the interpreter. Now a normal icmp instruction is used, which is supported. However, we fail to interpret due to incorrect handling of weak function addresses.