dexonsmith added a comment.

In D74813#1982089 <https://reviews.llvm.org/D74813#1982089>, @alexbdv wrote:

> @erik.pilkington / @vsk / @dexonsmith - how block name = 
> hash(parent_function_name + block_type) ? 
>  So any blocks that are inside the same parent function + have the same type 
> will get an incremental number to de-duplicate names.


Do these need to be behind a hash, or can we just put that directly in the 
block name?  The name is currently `__<mangled-function-name>_block_invoke` 
followed by an optional integer discriminator.  We could call it 
`__<mangled-function-name>_block_invoke_<mangled-block-type>` followed by an 
optional discriminator.  WDYT?



================
Comment at: clang/lib/AST/Mangle.cpp:86-87
+
 // FIXME: For blocks we currently mimic GCC's mangling scheme, which leaves
 // much to be desired. Come up with a better mangling scheme.
+static void mangleFunctionBlock(MangleContext &Context, StringRef Outer,
----------------
Seems like this patch is addressing this FIXME.  Can it be removed?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74813/new/

https://reviews.llvm.org/D74813



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to