[PATCH] D15674: [CodeGen] Fix assignments of inline layouts into the byref structure

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 19 21:19:41 PST 2015


vsk created this revision.
vsk added a reviewer: rjmccall.
vsk added a subscriber: cfe-commits.

[CodeGen] Fix assignments of inline layouts into the byref structure

When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.

Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.

rdar://23713871

http://reviews.llvm.org/D15674

Files:
  lib/CodeGen/CGBlocks.cpp
  lib/CodeGen/CGObjCGNU.cpp
  lib/CodeGen/CGObjCMac.cpp
  lib/CodeGen/CGObjCRuntime.h
  test/CodeGenObjCXX/blocks.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15674.43316.patch
Type: text/x-patch
Size: 4223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151220/1fab7342/attachment.bin>


More information about the cfe-commits mailing list