This revision was automatically updated to reflect the committed changes.
Closed by commit rG6796053723a6: [CodeGen] Fix the type of the constant that is
used to zero-initialize a (authored by ahatanak).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151172/new/
https://reviews.llvm.org/D151172
aaron.ballman added a comment.
LGTM, but I'll leave it to @efriedma to do the final sign-off.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151172/new/
https://reviews.llvm.org/D151172
___
cfe-commits
ahatanak updated this revision to Diff 524746.
ahatanak added a comment.
Fix the desired type of incomplete arrays that is passed to `EmitArrayConstant`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151172/new/
https://reviews.llvm.org/D151172
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:964
+ if (NonzeroLength == 0 &&
+ (DesiredType->getNumElements() != 0 || Elements.empty()))
return llvm::ConstantAggregateZero::get(DesiredType);
Not sure I like this
ahatanak created this revision.
ahatanak added reviewers: efriedma, aaron.ballman, rjmccall.
ahatanak added a project: clang.
Herald added a project: All.
ahatanak requested review of this revision.
`EmitArrayConstant` was incorrectly returning a zeroinitializer of zero-element
array type when