[all-commits] [llvm/llvm-project] dc4e25: [CodeGen][ObjC] Don't try to retain a __unsafe_unr...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Wed May 6 12:47:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dc4e25d4f238afb171aacb3774e1162c69574a0a
      https://github.com/llvm/llvm-project/commit/dc4e25d4f238afb171aacb3774e1162c69574a0a
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2020-05-06 (Wed, 06 May 2020)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGenObjC/os_log.m

  Log Message:
  -----------
  [CodeGen][ObjC] Don't try to retain a __unsafe_unretained ARC pointer
passed to __builtin_os_log_format to extend its lifetime to the end of
its enclosing block

Extend only lifetimes of pointers returned by function calls or message
sends instead. In the long term, we should lifetime-extend pointers in
more complex expressions and non-ARC objects (e.g., C++ temporaries)
too.

rdar://problem/61846261




More information about the All-commits mailing list