Skip to content
Commit c41ba094 authored by Kuba Mracek's avatar Kuba Mracek
Browse files

[objc] Don't require null-check and don't emit memset when result is ignored...

[objc] Don't require null-check and don't emit memset when result is ignored for struct-returning method calls [compiler-rt part]

This fixes an issue with the emission of lifetime markers for struct-returning Obj-C msgSend calls. When the result of a struct-returning call is ignored, the temporary storage is only marked with lifetime markers in one of the two branches of the nil-receiver-check. The check is, however, not required when the result is unused. If we still need to emit the check (due to consumer arguments), let's not emit the memset to zero out the result if it's unused. This fixes a use-after-scope false positive with AddressSanitizer.

Differential Revision: https://reviews.llvm.org/D34834

llvm-svn: 306838
parent bce5ceab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment