llvm-project
llvm-project copied to clipboard
[BoundsSafety] Don't bind lvalues with temporary locations
This should fix a miscompilation bug found during adoption. When a base is lvalue and is wrapped in OVE, the compiler incorrectly creates a temporary and maps its address to the lvalue instead of the actual address of the lvalue.
The solution is to emit lvalue directly instead of creating extra temporary.
rdar://146329029
@swift-ci test llvm
Closing it, as I identified a regression in a SWB with this change.