HomePhabricator

[CodeGen] Use the mangle context owned by CodeGenModule to correctly

Description

[CodeGen] Use the mangle context owned by CodeGenModule to correctly
mangle types of lambda objects captured by a block instead of creating a
new mangle context everytime a captured field type is mangled.

This fixes a bug in IRGen's block helper merging code that was
introduced in r339438 where two blocks capturing two distinct lambdas
would end up sharing helper functions and the block descriptor. This
happened because the ID number used to distinguish lambdas defined
in the same context is reset everytime a mangled context is created.

rdar://problem/45314494

Details

Committed
ahatanakOct 19 2018, 10:45 PM
Parents
rC344832: [X86] Add support for more than 32 features for __builtin_cpu_is
Branches
Unknown
Tags
Unknown