We already do some special work when a Function returns a pointer (passing the target object to the parent's call Instruction). We should also check that the returned pointer does not refer to an alloca (or byval argument) in the current Function, which will allow us to detect an error sooner than any subsequent invalid use of the pointer.
We already do some special work when a Function returns a pointer (passing the target object to the parent's call Instruction). We should also check that the returned pointer does not refer to an alloca (or byval argument) in the current Function, which will allow us to detect an error sooner than any subsequent invalid use of the pointer.