summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2016-09-16 00:02:06 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2016-09-16 00:02:06 +0000
commitd542ccfc9761bf3acfc9926e805069a08ee2aadd (patch)
tree39b9a17f7d6213d581a641b2bfd4073cef61367c /llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
parentf8f31c4985f9276811ba4c30ec8ebdd4992093d5 (diff)
downloadbcm5719-llvm-d542ccfc9761bf3acfc9926e805069a08ee2aadd.tar.gz
bcm5719-llvm-d542ccfc9761bf3acfc9926e805069a08ee2aadd.zip
[CodeGen][ObjC] Block captures should inherit the type of the captured
field in the enclosing lambda or block. This patch fixes a bug in code-gen where it uses the type of the declared variable rather than the type of the capture of the enclosing lambda or block for the block capture. For example, in the following function, code-gen currently uses i32* for the block capture "a" because "a" is passed to foo1 as a reference, but it should use i32 since the enclosing lambda captures "a" by value. void foo1(int &a) { auto lambda = [a]{ auto block1 = ^{ i = a; }; block1(); }; lambda(); } rdar://problem/18586386 Differential Revision: https://reviews.llvm.org/D21104 llvm-svn: 281682
Diffstat (limited to 'llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud