mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 09:58:34 +00:00
A pointer used where a value is expected is dereferenced to it, with a null check, in helper arguments, printk arguments, binary-operation operands and comparisons, all through deref_to_depth. return was the one consumer that never joined that convention, so `return p` on a map lookup emitted `ret i64*` and left it to llc to reject. handle_return now goes through get_typed_operand, which is that path, and converts the result to the declared return type like the augmented-assignment store does. convert() no longer passes a non-integer through silently: every caller either checks both sides or is on an integer-only path, so what reaches that branch is a type error, and it is raised with both types named instead of surfacing from llc with an IR line number. Returning a struct value is the case that now fails at compile time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>