[CodeGen] Before entering the loop that copies a non-trivial array field
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 2 Oct 2018 01:00:44 +0000 (01:00 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 2 Oct 2018 01:00:44 +0000 (01:00 +0000)
commit9d34307788056d8be15863697e1b7ec7ec3f204e
tree75a0ef7efc185a4cc36aa58cd5474b7cc1d2e54a
parent31fddbac8fa7ca0f18b6781a05346b447a607c4f
[CodeGen] Before entering the loop that copies a non-trivial array field
of a non-trivial C struct, copy the preceding trivial fields that
haven't been copied.

This commit fixes a bug where the instructions used to copy the
preceding trivial fields were emitted inside the loop body.

rdar://problem/44185064

llvm-svn: 343556
clang/lib/CodeGen/CGNonTrivialStruct.cpp
clang/test/CodeGenObjC/strong-in-c-struct.m