]> granicus.if.org Git - clang/commit
Avoid needlessly copying a block to the heap when a block literal
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 27 Feb 2019 18:17:16 +0000 (18:17 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 27 Feb 2019 18:17:16 +0000 (18:17 +0000)
commitd1a9bd85a0992e98f70fe88621509e2411a82ed2
treed0d601a3e516600aa8092274aa82b6ac51f0b7e7
parentcba260be30a09c5b58513b2f3828ddb89a0c71d0
Avoid needlessly copying a block to the heap when a block literal
initializes a local auto variable or is assigned to a local auto
variable that is declared in the scope that introduced the block
literal.

rdar://problem/13289333

https://reviews.llvm.org/D58514

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355012 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/AST/Decl.h
include/clang/AST/DeclBase.h
lib/AST/Decl.cpp
lib/CodeGen/CGObjC.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/CodeGenObjC/arc-block-copy-escape.m
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjCXX/arc-blocks.mm
test/PCH/arc-blocks.mm [new file with mode: 0644]