[all-commits] [llvm/llvm-project] e5df9c: [CodeGen] Treat ObjC `__unsafe_unretained` and cla...
Akira Hatanaka via All-commits
all-commits at lists.llvm.org
Tue Jan 11 11:22:23 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e5df9cc098b554ebb066792e40cbde6feddc57bc
https://github.com/llvm/llvm-project/commit/e5df9cc098b554ebb066792e40cbde6feddc57bc
Author: Akira Hatanaka <ahatanaka at apple.com>
Date: 2022-01-11 (Tue, 11 Jan 2022)
Changed paths:
M clang/lib/CodeGen/CGBlocks.cpp
M clang/lib/CodeGen/CGBlocks.h
M clang/lib/CodeGen/CGObjCMac.cpp
M clang/test/CodeGenObjC/arc-blocks.m
M clang/test/CodeGenObjC/blocks.m
Log Message:
-----------
[CodeGen] Treat ObjC `__unsafe_unretained` and class types as trivial
when generating copy/dispose helper functions
Analyze the block captures just once before generating copy/dispose
block helper functions and honor the inert `__unsafe_unretained`
qualifier. This refactor fixes a bug where captures of ObjC
`__unsafe_unretained` and class types were needlessly retained/released
by the copy/dispose helper functions.
Differential Revision: https://reviews.llvm.org/D116948
More information about the All-commits
mailing list