[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 21:42:48 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D50152#1191777, @ahatanak wrote:

> Since BlockVarCopyInits is a map with key `VarDecl *`, I think we want to add a flag to VarDecl (NonParmVarDeclBits) that indicates whether the copy expression can throw or not. Or is there a reason to store the bit in `BlockDecl::Capture` instead?


I was thinking about the non-`__block` capture case, sorry.  For `__block` variables, I think the values of that map should just be... well, I'd make a struct wrapping it, but basically a `PointerIntPair` of an `Expr*` and the `canThrow` flag.


Repository:
  rC Clang

https://reviews.llvm.org/D50152





More information about the cfe-commits mailing list