llvm-project/clang/lib/Serialization
Akira Hatanaka 8e57b07f66 Distinguish `__block` variables that are captured by escaping blocks
from those that aren't.

This patch changes the way __block variables that aren't captured by
escaping blocks are handled:

- Since non-escaping blocks on the stack never get copied to the heap
  (see https://reviews.llvm.org/D49303), Sema shouldn't error out when
  the type of a non-escaping __block variable doesn't have an accessible
  copy constructor.

- IRGen doesn't have to use the specialized byref structure (see
  https://clang.llvm.org/docs/Block-ABI-Apple.html#id8) for a
  non-escaping __block variable anymore. Instead IRGen can emit the
  variable as a normal variable and copy the reference to the block
  literal. Byref copy/dispose helpers aren't needed either.

This reapplies r343518 after fixing a use-after-free bug in function
Sema::ActOnBlockStmtExpr where the BlockScopeInfo was dereferenced after
it was popped and deleted.

rdar://problem/39352313

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

llvm-svn: 343542
2018-10-01 21:51:28 +00:00
..
ASTCommon.cpp [OPENMP] Add support for OMP5 requires directive + unified_address clause 2018-09-26 04:28:39 +00:00
ASTCommon.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ASTReader.cpp Add support for unified_shared_memory clause on requires directive 2018-10-01 13:47:43 +00:00
ASTReaderDecl.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
ASTReaderInternals.h Remove trailing space 2018-07-30 19:24:48 +00:00
ASTReaderStmt.cpp [cxx2a] P0614R1: Support init-statements in range-based for loops. 2018-09-28 18:44:09 +00:00
ASTWriter.cpp Add support for unified_shared_memory clause on requires directive 2018-10-01 13:47:43 +00:00
ASTWriterDecl.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
ASTWriterStmt.cpp [cxx2a] P0614R1: Support init-statements in range-based for loops. 2018-09-28 18:44:09 +00:00
CMakeLists.txt Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GeneratePCH.cpp Apply clang-tidy's performance-unnecessary-value-param to parts of clang. 2017-03-21 21:35:04 +00:00
GlobalModuleIndex.cpp Support: Simplify endian stream interface. NFCI. 2018-05-18 19:46:24 +00:00
Module.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ModuleFileExtension.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleManager.cpp Close FileEntries of cached files in ModuleManager::addModule(). 2018-08-20 17:10:27 +00:00
MultiOnDiskHashTable.h Support: Simplify endian stream interface. NFCI. 2018-05-18 19:46:24 +00:00