This revision was automatically updated to reflect the committed changes.
Closed by commit rL316723: [CodeGen] Add support for IncompleteArrayType in
Obj-C ivars. (authored by vsapsai).
Changed prior to commit:
https://reviews.llvm.org/D38774?vs=120337=120524#toc
Repository:
rL LLVM
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Thanks, LGTM.
https://reviews.llvm.org/D38774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
vsapsai updated this revision to Diff 120337.
vsapsai added a comment.
- Address rjmccall review comment about nested arrays.
https://reviews.llvm.org/D38774
Files:
clang/lib/CodeGen/CGObjCMac.cpp
clang/test/CodeGenObjC/ivar-layout-flexible-array.m
Index:
vsapsai added inline comments.
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095
+fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType();
+ }
+
rjmccall wrote:
> vsapsai wrote:
> > rjmccall wrote:
> > > You can't just use isa<> here; there can be
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095
+fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType();
+ }
+
vsapsai wrote:
> rjmccall wrote:
> > You can't just use isa<> here; there can be typedefs of incomplete
vsapsai updated this revision to Diff 119952.
vsapsai added a comment.
- Resubmit my last change without files from underlying branch.
https://reviews.llvm.org/D38774
Files:
clang/lib/CodeGen/CGObjCMac.cpp
clang/test/CodeGenObjC/ivar-layout-flexible-array.m
Index:
vsapsai updated this revision to Diff 119951.
vsapsai added a comment.
- Address rjmccall review comment about isa<>.
Decided to keep in test only cases with typedefs because test coverage is the
same and there is less similar code.
https://reviews.llvm.org/D38774
Files:
vsapsai added inline comments.
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095
+fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType();
+ }
+
rjmccall wrote:
> You can't just use isa<> here; there can be typedefs of incomplete array type.
Thanks
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095
+fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType();
+ }
+
You can't just use isa<> here; there can be typedefs of incomplete array type.
vsapsai added a comment.
To save reviewers some time. Incomplete array type is not the same as for
zero-sized array, it is `c"^c\00"` while for zero-sized array it is
`c"[0c]\00"`. Don't know if it matters, I haven't found any difference in
behaviour. Though maybe I wasn't looking in the right
vsapsai added a comment.
This patch depends on sema change https://reviews.llvm.org/D38773
https://reviews.llvm.org/D38774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vsapsai created this revision.
Fixes an assertion failure when ivar is a struct containing incomplete
array. Also completes support for direct flexible array members.
rdar://problem/21054495
https://reviews.llvm.org/D38774
Files:
clang/lib/CodeGen/CGObjCMac.cpp
12 matches
Mail list logo